Skip to content

Commit

Permalink
Fix configuring kudo test assert timeouts via configuration file (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarrick-mesosphere authored and kensipe committed Jul 12, 2019
1 parent 0090741 commit 8ee3d78
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/test/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (h *Harness) LoadTests(dir string) ([]*Case, error) {
func (h *Harness) GetTimeout() int {
timeout := 30
if h.TestSuite.Timeout != 0 {
timeout = 30
timeout = h.TestSuite.Timeout
}
return timeout
}
Expand Down
15 changes: 15 additions & 0 deletions pkg/test/harness_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package test

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestGetTimeout(t *testing.T) {
h := Harness{}
assert.Equal(t, 30, h.GetTimeout())

h.TestSuite.Timeout = 45
assert.Equal(t, 45, h.GetTimeout())
}

0 comments on commit 8ee3d78

Please sign in to comment.