summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e/containers_conf_test.go19
-rw-r--r--test/system/030-run.bats1
-rw-r--r--test/system/500-networking.bats4
3 files changed, 23 insertions, 1 deletions
diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go
index 803124de1..a354de3b2 100644
--- a/test/e2e/containers_conf_test.go
+++ b/test/e2e/containers_conf_test.go
@@ -353,4 +353,23 @@ var _ = Describe("Podman run", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(ContainSubstring("test"))
})
+
+ It("podman info seccomp profile path", func() {
+ configPath := filepath.Join(podmanTest.TempDir, "containers.conf")
+ os.Setenv("CONTAINERS_CONF", configPath)
+
+ profile := filepath.Join(podmanTest.TempDir, "seccomp.json")
+ containersConf := []byte(fmt.Sprintf("[containers]\nseccomp_profile=\"%s\"", profile))
+ err = ioutil.WriteFile(configPath, containersConf, os.ModePerm)
+ Expect(err).To(BeNil())
+
+ if IsRemote() {
+ podmanTest.RestartRemoteService()
+ }
+
+ session := podmanTest.Podman([]string{"info", "--format", "{{.Host.Security.SECCOMPProfilePath}}"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal(profile))
+ })
})
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index c007a1557..2b83fa56e 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -501,6 +501,7 @@ json-file | f
run_podman inspect --format '{{.OCIRuntime}}' $cid
is "$output" "$new_runtime" "podman inspect shows configured runtime"
run_podman kill $cid
+ run_podman wait $cid
run_podman rm $cid
rm -f $new_runtime
}
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index 21240e521..788dc4cd1 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -116,6 +116,7 @@ load helpers
is "$output" ".*${teststring}.*" "test string received on container"
# Clean up
+ run_podman wait $cid
run_podman rm $cid
done
}
@@ -140,7 +141,7 @@ load helpers
is "$output" ".* inet ${mysubnet}\.2/24 brd ${mysubnet}\.255 " \
"sdfsdf"
- run_podman run --rm -d --network $mynetname -p 127.0.0.1:$myport:$myport \
+ run_podman run -d --network $mynetname -p 127.0.0.1:$myport:$myport \
$IMAGE nc -l -n -v -p $myport
cid="$output"
@@ -166,6 +167,7 @@ load helpers
is "$output" "Error: the network name $mynetname is already used" \
"Trying to create an already-existing network"
+ run_podman rm $cid
run_podman network rm $mynetname
run_podman 1 network rm $mynetname
}