From b752a5eedc168e16b74a087a4b0b7059ebc3a09a Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 6 Feb 2022 16:28:34 -0800 Subject: [PATCH] Fix tests to set missing arg --- pkg/hook/exechook_test.go | 6 +++--- pkg/hook/webhook_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/hook/exechook_test.go b/pkg/hook/exechook_test.go index 144e29d..990f76c 100644 --- a/pkg/hook/exechook_test.go +++ b/pkg/hook/exechook_test.go @@ -27,7 +27,7 @@ import ( func TestNotZeroReturnExechookDo(t *testing.T) { t.Run("test not zero return code", func(t *testing.T) { - l := logging.New("", "") + l := logging.New("", "", 0) ch := NewExechook( cmd.NewRunner(l), "false", @@ -45,7 +45,7 @@ func TestNotZeroReturnExechookDo(t *testing.T) { func TestZeroReturnExechookDo(t *testing.T) { t.Run("test zero return code", func(t *testing.T) { - l := logging.New("", "") + l := logging.New("", "", 0) ch := NewExechook( cmd.NewRunner(l), "true", @@ -63,7 +63,7 @@ func TestZeroReturnExechookDo(t *testing.T) { func TestTimeoutExechookDo(t *testing.T) { t.Run("test timeout", func(t *testing.T) { - l := logging.New("", "") + l := logging.New("", "", 0) ch := NewExechook( cmd.NewRunner(l), "/bin/sh", diff --git a/pkg/hook/webhook_test.go b/pkg/hook/webhook_test.go index 4775213..2e6119c 100644 --- a/pkg/hook/webhook_test.go +++ b/pkg/hook/webhook_test.go @@ -31,7 +31,7 @@ func TestWebhookDo(t *testing.T) { "POST", 200, time.Second, - logging.New("", ""), + logging.New("", "", 0), ) err := wh.Do(context.Background(), "hash") if err == nil {