Skip to content

Commit

Permalink
Fix tests to set missing arg
Browse files Browse the repository at this point in the history
  • Loading branch information
thockin committed Feb 7, 2022
1 parent 2a7f7f5 commit b752a5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/hook/exechook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion pkg/hook/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b752a5e

Please sign in to comment.