Skip to content

Commit

Permalink
make delayed progress tests more resilient (#3526)
Browse files Browse the repository at this point in the history
allow progress tests to take more time than expected for CI
  • Loading branch information
leehinman authored Oct 5, 2023
1 parent 160b034 commit ac2ef57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/pkg/agent/install/progress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestProgress(t *testing.T) {

rs.Failed()

require.Regexp(t, regexp.MustCompile(`step 1 starting\.{3}\.+ FAILED\n`), string(w.buf))
require.Regexp(t, regexp.MustCompile(`step 1 starting\.{3,}\.+ FAILED\n`), string(w.buf))
})

t.Run("multi_step_immediate_success", func(t *testing.T) {
Expand Down Expand Up @@ -93,7 +93,7 @@ func TestProgress(t *testing.T) {

rs.Succeeded()

require.Regexp(t, regexp.MustCompile(`step 1 starting\.{3}\.+ DONE\nstep 2 starting\.{3}\.+ DONE`), string(w.buf))
require.Regexp(t, regexp.MustCompile(`step 1 starting\.{3,}\.+ DONE\nstep 2 starting\.{3,}\.+ DONE`), string(w.buf))
})

t.Run("single_step_delay_after_failed", func(t *testing.T) {
Expand All @@ -110,7 +110,7 @@ func TestProgress(t *testing.T) {

rs.Failed()

require.Equal(t, "step 1 starting... FAILED\n", string(w.buf))
require.Regexp(t, regexp.MustCompile(`step 1 starting.{3,} FAILED\n`), string(w.buf))

})

Expand All @@ -133,6 +133,6 @@ func TestProgress(t *testing.T) {

rs.Succeeded()

require.Regexp(t, regexp.MustCompile(`step starting\.{3}\n substep 1 starting\.{3}\.+ DONE\n substep 2 starting\.{3}\.+ DONE\n DONE\n`), string(w.buf))
require.Regexp(t, regexp.MustCompile(`step starting\.{3,}\n substep 1 starting\.{3,}\.+ DONE\n substep 2 starting\.{3,}\.+ DONE\n DONE\n`), string(w.buf))
})
}

0 comments on commit ac2ef57

Please sign in to comment.