summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-28 15:40:30 -0400
committerGitHub <noreply@github.com>2021-04-28 15:40:30 -0400
commitdb67fedcbd1fcaf06d0d6655face5182ccd0cc87 (patch)
treef3bd173fc406903531cd451b3155720194fa2272 /test
parent928dce57dfb11c110801547b9852aa4f87e37bb4 (diff)
parent18cb17ffeb33195879730b2bc83e1a2c82310e6a (diff)
downloadpodman-db67fedcbd1fcaf06d0d6655face5182ccd0cc87.tar.gz
podman-db67fedcbd1fcaf06d0d6655face5182ccd0cc87.tar.bz2
podman-db67fedcbd1fcaf06d0d6655face5182ccd0cc87.zip
Merge pull request #10155 from pablofsf/fix-default-seccomp
Use seccomp_profile as default profile if defined in containers.conf
Diffstat (limited to 'test')
-rw-r--r--test/e2e/containers_conf_test.go19
1 files changed, 19 insertions, 0 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))
+ })
})