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/utils
test/e2e/storage/vsphere
test/e2e/upgrades
test/e2e/upgrades/storage
test/images/agnhost/dns
test/images/agnhost/inclusterclient
test/images/agnhost/net/nat

View File

@ -49,11 +49,11 @@ func (t *ServiceUpgradeTest) Setup(f *framework.Framework) {
cs := f.ClientSet
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
})
framework.ExpectNoError(err)
tcpService, err = jig.WaitForLoadBalancer(e2eservice.GetServiceLoadBalancerCreationTimeout(cs))
tcpService, err := jig.WaitForLoadBalancer(e2eservice.GetServiceLoadBalancerCreationTimeout(cs))
framework.ExpectNoError(err)
// Get info to hit it with

View File

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

View File

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