summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e/common_test.go6
-rw-r--r--test/e2e/exec_test.go2
-rw-r--r--test/e2e/mount_rootless_test.go2
-rw-r--r--test/e2e/network_test.go2
-rw-r--r--test/e2e/play_kube_test.go4
-rw-r--r--test/e2e/run_aardvark_test.go30
-rw-r--r--test/system/270-socket-activation.bats2
-rw-r--r--test/system/500-networking.bats2
-rw-r--r--test/system/helpers.bash4
-rw-r--r--test/testvol/main.go9
10 files changed, 30 insertions, 33 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/exec_test.go b/test/e2e/exec_test.go
index 4cfaa9a2e..3987746d0 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -123,7 +123,7 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec in keep-id container drops privileges", func() {
- SkipIfNotRootless("This function is not enabled for rootfull podman")
+ SkipIfNotRootless("This function is not enabled for rootful podman")
ctrName := "testctr1"
testCtr := podmanTest.Podman([]string{"run", "-d", "--name", ctrName, "--userns=keep-id", ALPINE, "top"})
testCtr.WaitWithDefaultTimeout()
diff --git a/test/e2e/mount_rootless_test.go b/test/e2e/mount_rootless_test.go
index 830c2dcda..30d7ce8a9 100644
--- a/test/e2e/mount_rootless_test.go
+++ b/test/e2e/mount_rootless_test.go
@@ -17,7 +17,7 @@ var _ = Describe("Podman mount", func() {
)
BeforeEach(func() {
- SkipIfNotRootless("This function is not enabled for rootfull podman")
+ SkipIfNotRootless("This function is not enabled for rootful podman")
SkipIfRemote("Podman mount not supported for remote connections")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go
index a7981a4d8..89a9005f5 100644
--- a/test/e2e/network_test.go
+++ b/test/e2e/network_test.go
@@ -254,7 +254,7 @@ var _ = Describe("Podman network", func() {
expectedNetworks := []string{name}
if !rootless.IsRootless() {
- // rootfull image contains "podman/cni/87-podman-bridge.conflist" for "podman" network
+ // rootful image contains "podman/cni/87-podman-bridge.conflist" for "podman" network
expectedNetworks = append(expectedNetworks, "podman")
}
session := podmanTest.Podman(append([]string{"network", "inspect"}, expectedNetworks...))
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)
})
diff --git a/test/system/270-socket-activation.bats b/test/system/270-socket-activation.bats
index 19f68abdd..6d582be18 100644
--- a/test/system/270-socket-activation.bats
+++ b/test/system/270-socket-activation.bats
@@ -90,7 +90,7 @@ function teardown() {
@test "podman system service - socket activation - kill rootless pause" {
if ! is_rootless; then
- skip "there is no pause process when running rootfull"
+ skip "there is no pause process when running rootful"
fi
run_podman run -d $IMAGE sleep 90
cid="$output"
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index 958aa4493..01571d176 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -83,7 +83,7 @@ load helpers
}
# Issue #5466 - port-forwarding doesn't work with this option and -d
-@test "podman networking: port with --userns=keep-id for rootless or --uidmap=* for rootfull" {
+@test "podman networking: port with --userns=keep-id for rootless or --uidmap=* for rootful" {
for cidr in "" "$(random_rfc1918_subnet).0/24"; do
myport=$(random_free_port 52000-52999)
if [[ -z $cidr ]]; then
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 1a1dc0df9..138d668f4 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -423,7 +423,7 @@ function skip_if_rootless() {
######################
function skip_if_not_rootless() {
if ! is_rootless; then
- local msg=$(_add_label_if_missing "$1" "rootfull")
+ local msg=$(_add_label_if_missing "$1" "rootful")
skip "${msg:-not applicable under rootlfull podman}"
fi
}
@@ -483,7 +483,7 @@ function skip_if_root_ubuntu {
if is_ubuntu; then
if ! is_remote; then
if ! is_rootless; then
- skip "Cannot run this test on rootfull ubuntu, usually due to user errors"
+ skip "Cannot run this test on rootful ubuntu, usually due to user errors"
fi
fi
fi
diff --git a/test/testvol/main.go b/test/testvol/main.go
index 883f55f82..30ab365b3 100644
--- a/test/testvol/main.go
+++ b/test/testvol/main.go
@@ -86,10 +86,7 @@ func startServer(socketPath string) error {
}
}
- handle, err := makeDirDriver(config.path)
- if err != nil {
- return errors.Wrapf(err, "error making volume driver")
- }
+ handle := makeDirDriver(config.path)
logrus.Infof("Using %s for volume path", config.path)
server := volume.NewHandler(handle)
@@ -116,12 +113,12 @@ type dirVol struct {
}
// Make a new DirDriver.
-func makeDirDriver(path string) (volume.Driver, error) {
+func makeDirDriver(path string) volume.Driver {
drv := new(DirDriver)
drv.volumesPath = path
drv.volumes = make(map[string]*dirVol)
- return drv, nil
+ return drv
}
// Capabilities returns the capabilities of the driver.