Skip to content

Commit 6fcd030

Browse files
committed
fix staticcheck failures of test/e2e/upgrade
1 parent 716b454 commit 6fcd030

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

hack/.staticcheck_failures

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ test/e2e/storage/drivers
7777
test/e2e/storage/testsuites
7878
test/e2e/storage/utils
7979
test/e2e/storage/vsphere
80-
test/e2e/upgrades
81-
test/e2e/upgrades/storage
8280
test/images/agnhost/dns
8381
test/images/agnhost/inclusterclient
8482
test/images/agnhost/net/nat

test/e2e/upgrades/services.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ func (t *ServiceUpgradeTest) Setup(f *framework.Framework) {
4949
cs := f.ClientSet
5050

5151
ginkgo.By("creating a TCP service " + serviceName + " with type=LoadBalancer in namespace " + ns.Name)
52-
tcpService, err := jig.CreateTCPService(func(s *v1.Service) {
52+
_, err := jig.CreateTCPService(func(s *v1.Service) {
5353
s.Spec.Type = v1.ServiceTypeLoadBalancer
5454
})
5555
framework.ExpectNoError(err)
56-
tcpService, err = jig.WaitForLoadBalancer(e2eservice.GetServiceLoadBalancerCreationTimeout(cs))
56+
tcpService, err := jig.WaitForLoadBalancer(e2eservice.GetServiceLoadBalancerCreationTimeout(cs))
5757
framework.ExpectNoError(err)
5858

5959
// Get info to hit it with

test/e2e/upgrades/storage/volume_mode.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ const devicePath = "/mnt/volume1"
3838
// formatted and mounted like a nil/Filesystem PV after a downgrade to a version
3939
// where the BlockVolume feature is disabled
4040
type VolumeModeDowngradeTest struct {
41-
pvSource *v1.PersistentVolumeSource
42-
pv *v1.PersistentVolume
43-
pvc *v1.PersistentVolumeClaim
44-
pod *v1.Pod
41+
pv *v1.PersistentVolume
42+
pvc *v1.PersistentVolumeClaim
43+
pod *v1.Pod
4544
}
4645

4746
// Name returns the tracking name of the test.

test/e2e/upgrades/sysctl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ func (t *SysctlUpgradeTest) verifySafeSysctlWork(f *framework.Framework) *v1.Pod
8080
ginkgo.By("Creating a pod with safe sysctls")
8181
safeSysctl := "net.ipv4.ip_local_port_range"
8282
safeSysctlValue := "1024 1042"
83-
validPod := sysctlTestPod("valid-sysctls", map[string]string{safeSysctl: safeSysctlValue})
84-
validPod = f.PodClient().Create(t.validPod)
83+
sysctlTestPod("valid-sysctls", map[string]string{safeSysctl: safeSysctlValue})
84+
validPod := f.PodClient().Create(t.validPod)
8585

8686
ginkgo.By("Making sure the valid pod launches")
8787
ev, err := f.PodClient().WaitForErrorEventOrSuccess(t.validPod)

0 commit comments

Comments
 (0)