aboutsummaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-25 13:43:57 -0400
committerGitHub <noreply@github.com>2022-04-25 13:43:57 -0400
commit09ef4f2e226c0bd769c93817fa5a4df1a9bb9f8b (patch)
tree1d8b6afb20e8b48f9193d4897162c3a1d24dbd4a /test/e2e
parent23d2bf518884df59f7177099d07b11b1ca344a2f (diff)
parentc7b16645aff27fff0b87bb2a98298693bbf20894 (diff)
downloadpodman-09ef4f2e226c0bd769c93817fa5a4df1a9bb9f8b.tar.gz
podman-09ef4f2e226c0bd769c93817fa5a4df1a9bb9f8b.tar.bz2
podman-09ef4f2e226c0bd769c93817fa5a4df1a9bb9f8b.zip
Merge pull request #13978 from Luap99/unparam
enable unparam linter
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/common_test.go6
-rw-r--r--test/e2e/play_kube_test.go4
-rw-r--r--test/e2e/run_aardvark_test.go30
3 files changed, 20 insertions, 20 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go
index 5e0c6e837..766f39964 100644
--- a/test/e2e/common_test.go
+++ b/test/e2e/common_test.go
@@ -1047,7 +1047,7 @@ var IPRegex = `(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01
// digShort execs into the given container and does a dig lookup with a timeout
// backoff. If it gets a response, it ensures that the output is in the correct
// format and iterates a string array for match
-func digShort(container, lookupName string, matchNames []string, p *PodmanTestIntegration) string {
+func digShort(container, lookupName string, matchNames []string, p *PodmanTestIntegration) {
digInterval := time.Millisecond * 250
for i := 0; i < 6; i++ {
time.Sleep(digInterval * time.Duration(i))
@@ -1059,9 +1059,9 @@ func digShort(container, lookupName string, matchNames []string, p *PodmanTestIn
for _, name := range matchNames {
Expect(output).To(Equal(name))
}
- return output
+ // success
+ return
}
}
Fail("dns is not responding")
- return ""
}
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go
index f16180854..4dd05c755 100644
--- a/test/e2e/play_kube_test.go
+++ b/test/e2e/play_kube_test.go
@@ -680,7 +680,7 @@ func generateMultiDocKubeYaml(kubeObjects []string, pathname string) error {
return writeYaml(multiKube, pathname)
}
-func createSecret(podmanTest *PodmanTestIntegration, name string, value []byte) {
+func createSecret(podmanTest *PodmanTestIntegration, name string, value []byte) { //nolint:unparam
secretFilePath := filepath.Join(podmanTest.TempDir, "secret")
err := ioutil.WriteFile(secretFilePath, value, 0755)
Expect(err).To(BeNil())
@@ -1078,7 +1078,7 @@ func withVolumeMount(mountPath string, readonly bool) ctrOption {
}
}
-func withEnv(name, value, valueFrom, refName, refKey string, optional bool) ctrOption {
+func withEnv(name, value, valueFrom, refName, refKey string, optional bool) ctrOption { //nolint:unparam
return func(c *Ctr) {
e := Env{
Name: name,
diff --git a/test/e2e/run_aardvark_test.go b/test/e2e/run_aardvark_test.go
index c82f614a6..7b4598423 100644
--- a/test/e2e/run_aardvark_test.go
+++ b/test/e2e/run_aardvark_test.go
@@ -54,7 +54,7 @@ var _ = Describe("Podman run networking", func() {
cip := ctrIP.OutputToString()
Expect(cip).To(MatchRegexp(IPRegex))
- _ = digShort(cid, "aone", []string{cip}, podmanTest)
+ digShort(cid, "aone", []string{cip}, podmanTest)
reverseLookup := podmanTest.Podman([]string{"exec", cid, "dig", "+short", "-x", cip})
reverseLookup.WaitWithDefaultTimeout()
@@ -95,9 +95,9 @@ var _ = Describe("Podman run networking", func() {
cip2 := ctrIP2.OutputToString()
Expect(cip2).To(MatchRegexp(IPRegex))
- _ = digShort("aone", "atwo", []string{cip2}, podmanTest)
+ digShort("aone", "atwo", []string{cip2}, podmanTest)
- _ = digShort("atwo", "aone", []string{cip1}, podmanTest)
+ digShort("atwo", "aone", []string{cip1}, podmanTest)
reverseLookup12 := podmanTest.Podman([]string{"exec", cid1, "dig", "+short", "-x", cip2})
reverseLookup12.WaitWithDefaultTimeout()
@@ -144,17 +144,17 @@ var _ = Describe("Podman run networking", func() {
cip2 := ctrIP2.OutputToString()
Expect(cip2).To(MatchRegexp(IPRegex))
- _ = digShort("aone", "atwo", []string{cip2}, podmanTest)
+ digShort("aone", "atwo", []string{cip2}, podmanTest)
- _ = digShort("aone", "alias_a2", []string{cip2}, podmanTest)
+ digShort("aone", "alias_a2", []string{cip2}, podmanTest)
- _ = digShort("aone", "alias_2a", []string{cip2}, podmanTest)
+ digShort("aone", "alias_2a", []string{cip2}, podmanTest)
- _ = digShort("atwo", "aone", []string{cip1}, podmanTest)
+ digShort("atwo", "aone", []string{cip1}, podmanTest)
- _ = digShort("atwo", "alias_a1", []string{cip1}, podmanTest)
+ digShort("atwo", "alias_a1", []string{cip1}, podmanTest)
- _ = digShort("atwo", "alias_1a", []string{cip1}, podmanTest)
+ digShort("atwo", "alias_1a", []string{cip1}, podmanTest)
})
@@ -251,13 +251,13 @@ var _ = Describe("Podman run networking", func() {
cipA2B22 := ctrIPA2B22.OutputToString()
Expect(cipA2B22).To(MatchRegexp(IPRegex))
- _ = digShort("aone", "atwobtwo", []string{cipA2B21}, podmanTest)
+ digShort("aone", "atwobtwo", []string{cipA2B21}, podmanTest)
- _ = digShort("bone", "atwobtwo", []string{cipA2B22}, podmanTest)
+ digShort("bone", "atwobtwo", []string{cipA2B22}, podmanTest)
- _ = digShort("atwobtwo", "aone", []string{cipA1}, podmanTest)
+ digShort("atwobtwo", "aone", []string{cipA1}, podmanTest)
- _ = digShort("atwobtwo", "bone", []string{cipB1}, podmanTest)
+ digShort("atwobtwo", "bone", []string{cipB1}, podmanTest)
})
It("Aardvark Test 6: Three subnets, first container on 1/2 and second on 2/3, w/ network aliases", func() {
@@ -305,9 +305,9 @@ var _ = Describe("Podman run networking", func() {
Expect(ctrIPCB2).Should(Exit(0))
cipCB2 := ctrIPCB2.OutputToString()
- _ = digShort("aone", "testB2_nw", []string{cipCB2}, podmanTest)
+ digShort("aone", "testB2_nw", []string{cipCB2}, podmanTest)
- _ = digShort("cone", "testB1_nw", []string{cipAB1}, podmanTest)
+ digShort("cone", "testB1_nw", []string{cipAB1}, podmanTest)
})