From ac2ef57b335ebca28216240508bd773d53009c7a Mon Sep 17 00:00:00 2001 From: Lee E Hinman <57081003+leehinman@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:01:40 -0500 Subject: [PATCH] make delayed progress tests more resilient (#3526) allow progress tests to take more time than expected for CI --- internal/pkg/agent/install/progress_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/pkg/agent/install/progress_test.go b/internal/pkg/agent/install/progress_test.go index e74f7ff5666..2bb9bb6b1d3 100644 --- a/internal/pkg/agent/install/progress_test.go +++ b/internal/pkg/agent/install/progress_test.go @@ -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) { @@ -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) { @@ -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)) }) @@ -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)) }) }