summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-29 11:01:47 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-05 14:13:49 +0000
commitfdcf633a33bbbfbc99268965ef5da03a4770619b (patch)
tree59be1ab815261e106220a4691766830b58657ac0 /test/e2e/run_test.go
parentca3b2414516c04125f986775c0cbce27f0f1e505 (diff)
downloadpodman-fdcf633a33bbbfbc99268965ef5da03a4770619b.tar.gz
podman-fdcf633a33bbbfbc99268965ef5da03a4770619b.tar.bz2
podman-fdcf633a33bbbfbc99268965ef5da03a4770619b.zip
Add hooks support to podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #155 Approved by: mheon
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 16fae5898..21c577d9a 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
+ "github.com/mrunalp/fileutils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -217,6 +218,19 @@ var _ = Describe("Podman run", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman test hooks", func() {
+ hcheck := "/run/hookscheck"
+ hooksDir := "/tmp/hooks"
+ os.Mkdir(hooksDir, 0755)
+ fileutils.CopyFile("hooks/hooks.json", hooksDir)
+ os.Setenv("HOOK_OPTION", fmt.Sprintf("--hooks-dir-path=%s", hooksDir))
+ os.Remove(hcheck)
+ session := podmanTest.Podman([]string{"run", ALPINE, "ls"})
+ session.Wait(10)
+ os.Unsetenv("HOOK_OPTION")
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
It("podman run with secrets", func() {
containersDir := "/usr/share/containers"
err := os.MkdirAll(containersDir, 0755)