Merge pull request #85853 from SataQiu/fix-staticcheck-20191203

Fix staticcheck failures of test/e2e/upgrade
This commit is contained in:
Kubernetes Prow Robot 2019-12-03 21:51:18 -08:00 committed by GitHub
commit 0f332bae5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 10 deletions

View File

@ -77,8 +77,6 @@ test/e2e/storage/drivers
test/e2e/storage/testsuites test/e2e/storage/testsuites
test/e2e/storage/utils test/e2e/storage/utils
test/e2e/storage/vsphere test/e2e/storage/vsphere
test/e2e/upgrades
test/e2e/upgrades/storage
test/images/agnhost/dns test/images/agnhost/dns
test/images/agnhost/inclusterclient test/images/agnhost/inclusterclient
test/images/agnhost/net/nat test/images/agnhost/net/nat

View File

@ -49,11 +49,11 @@ func (t *ServiceUpgradeTest) Setup(f *framework.Framework) {
cs := f.ClientSet cs := f.ClientSet
ginkgo.By("creating a TCP service " + serviceName + " with type=LoadBalancer in namespace " + ns.Name) ginkgo.By("creating a TCP service " + serviceName + " with type=LoadBalancer in namespace " + ns.Name)
tcpService, err := jig.CreateTCPService(func(s *v1.Service) { _, err := jig.CreateTCPService(func(s *v1.Service) {
s.Spec.Type = v1.ServiceTypeLoadBalancer s.Spec.Type = v1.ServiceTypeLoadBalancer
}) })
framework.ExpectNoError(err) framework.ExpectNoError(err)
tcpService, err = jig.WaitForLoadBalancer(e2eservice.GetServiceLoadBalancerCreationTimeout(cs)) tcpService, err := jig.WaitForLoadBalancer(e2eservice.GetServiceLoadBalancerCreationTimeout(cs))
framework.ExpectNoError(err) framework.ExpectNoError(err)
// Get info to hit it with // Get info to hit it with

View File

@ -38,7 +38,6 @@ const devicePath = "/mnt/volume1"
// formatted and mounted like a nil/Filesystem PV after a downgrade to a version // formatted and mounted like a nil/Filesystem PV after a downgrade to a version
// where the BlockVolume feature is disabled // where the BlockVolume feature is disabled
type VolumeModeDowngradeTest struct { type VolumeModeDowngradeTest struct {
pvSource *v1.PersistentVolumeSource
pv *v1.PersistentVolume pv *v1.PersistentVolume
pvc *v1.PersistentVolumeClaim pvc *v1.PersistentVolumeClaim
pod *v1.Pod pod *v1.Pod

View File

@ -80,8 +80,8 @@ func (t *SysctlUpgradeTest) verifySafeSysctlWork(f *framework.Framework) *v1.Pod
ginkgo.By("Creating a pod with safe sysctls") ginkgo.By("Creating a pod with safe sysctls")
safeSysctl := "net.ipv4.ip_local_port_range" safeSysctl := "net.ipv4.ip_local_port_range"
safeSysctlValue := "1024 1042" safeSysctlValue := "1024 1042"
validPod := sysctlTestPod("valid-sysctls", map[string]string{safeSysctl: safeSysctlValue}) sysctlTestPod("valid-sysctls", map[string]string{safeSysctl: safeSysctlValue})
validPod = f.PodClient().Create(t.validPod) validPod := f.PodClient().Create(t.validPod)
ginkgo.By("Making sure the valid pod launches") ginkgo.By("Making sure the valid pod launches")
ev, err := f.PodClient().WaitForErrorEventOrSuccess(t.validPod) ev, err := f.PodClient().WaitForErrorEventOrSuccess(t.validPod)