mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #85853 from SataQiu/fix-staticcheck-20191203
Fix staticcheck failures of test/e2e/upgrade
This commit is contained in:
commit
0f332bae5d
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -38,10 +38,9 @@ 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Name returns the tracking name of the test.
|
// Name returns the tracking name of the test.
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user