From 45838b9561977f3e79cf2e61c7ed0dfd9badb303 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 11 May 2018 13:03:28 -0700 Subject: hooks: Add package support for extension stages We aren't consuming this yet, but these pkg/hooks changes lay the groundwork for future libpod changes to support post-exit hooks [1,2]. [1]: https://github.com/projectatomic/libpod/issues/730 [2]: https://github.com/opencontainers/runc/issues/1797 Signed-off-by: W. Trevor King Closes: #758 Approved by: rhatdan --- pkg/hooks/monitor_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg/hooks/monitor_test.go') diff --git a/pkg/hooks/monitor_test.go b/pkg/hooks/monitor_test.go index 3887b2072..78e8d3fe5 100644 --- a/pkg/hooks/monitor_test.go +++ b/pkg/hooks/monitor_test.go @@ -27,7 +27,7 @@ func TestMonitorGood(t *testing.T) { t.Fatal(err) } - manager, err := New(ctx, []string{dir}, lang) + manager, err := New(ctx, []string{dir}, []string{}, lang) if err != nil { t.Fatal(err) } @@ -50,7 +50,7 @@ func TestMonitorGood(t *testing.T) { time.Sleep(100 * time.Millisecond) // wait for monitor to notice config := &rspec.Spec{} - err = manager.Hooks(config, map[string]string{}, false) + _, err = manager.Hooks(config, map[string]string{}, false) if err != nil { t.Fatal(err) } @@ -84,7 +84,7 @@ func TestMonitorGood(t *testing.T) { config := &rspec.Spec{} expected := config.Hooks - err = manager.Hooks(config, map[string]string{}, false) + _, err = manager.Hooks(config, map[string]string{}, false) if err != nil { t.Fatal(err) } @@ -101,7 +101,7 @@ func TestMonitorGood(t *testing.T) { config := &rspec.Spec{} expected := config.Hooks - err = manager.Hooks(config, map[string]string{}, false) + _, err = manager.Hooks(config, map[string]string{}, false) if err != nil { t.Fatal(err) } @@ -126,7 +126,7 @@ func TestMonitorBadWatcher(t *testing.T) { t.Fatal(err) } - manager, err := New(ctx, []string{}, lang) + manager, err := New(ctx, []string{}, []string{}, lang) if err != nil { t.Fatal(err) } -- cgit v1.2.3-54-g00ecf