Fix tests to set missing arg
This commit is contained in:
parent
2a7f7f543b
commit
b752a5eedc
|
|
@ -27,7 +27,7 @@ import (
|
||||||
|
|
||||||
func TestNotZeroReturnExechookDo(t *testing.T) {
|
func TestNotZeroReturnExechookDo(t *testing.T) {
|
||||||
t.Run("test not zero return code", func(t *testing.T) {
|
t.Run("test not zero return code", func(t *testing.T) {
|
||||||
l := logging.New("", "")
|
l := logging.New("", "", 0)
|
||||||
ch := NewExechook(
|
ch := NewExechook(
|
||||||
cmd.NewRunner(l),
|
cmd.NewRunner(l),
|
||||||
"false",
|
"false",
|
||||||
|
|
@ -45,7 +45,7 @@ func TestNotZeroReturnExechookDo(t *testing.T) {
|
||||||
|
|
||||||
func TestZeroReturnExechookDo(t *testing.T) {
|
func TestZeroReturnExechookDo(t *testing.T) {
|
||||||
t.Run("test zero return code", func(t *testing.T) {
|
t.Run("test zero return code", func(t *testing.T) {
|
||||||
l := logging.New("", "")
|
l := logging.New("", "", 0)
|
||||||
ch := NewExechook(
|
ch := NewExechook(
|
||||||
cmd.NewRunner(l),
|
cmd.NewRunner(l),
|
||||||
"true",
|
"true",
|
||||||
|
|
@ -63,7 +63,7 @@ func TestZeroReturnExechookDo(t *testing.T) {
|
||||||
|
|
||||||
func TestTimeoutExechookDo(t *testing.T) {
|
func TestTimeoutExechookDo(t *testing.T) {
|
||||||
t.Run("test timeout", func(t *testing.T) {
|
t.Run("test timeout", func(t *testing.T) {
|
||||||
l := logging.New("", "")
|
l := logging.New("", "", 0)
|
||||||
ch := NewExechook(
|
ch := NewExechook(
|
||||||
cmd.NewRunner(l),
|
cmd.NewRunner(l),
|
||||||
"/bin/sh",
|
"/bin/sh",
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ func TestWebhookDo(t *testing.T) {
|
||||||
"POST",
|
"POST",
|
||||||
200,
|
200,
|
||||||
time.Second,
|
time.Second,
|
||||||
logging.New("", ""),
|
logging.New("", "", 0),
|
||||||
)
|
)
|
||||||
err := wh.Do(context.Background(), "hash")
|
err := wh.Do(context.Background(), "hash")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue