Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/source/gitlab/gitlab_poll.go2
-rw-r--r--internal/source/gitlab/gitlab_poll_test.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/internal/source/gitlab/gitlab_poll.go b/internal/source/gitlab/gitlab_poll.go
index 4dbc8754..bc1611ef 100644
--- a/internal/source/gitlab/gitlab_poll.go
+++ b/internal/source/gitlab/gitlab_poll.go
@@ -28,7 +28,7 @@ func (g *Gitlab) poll(interval, maxElapsedTime time.Duration) {
err := backoff.Retry(operation, backOff)
if err != nil {
- log.WithError(err).Errorf("Failed to connect to the internal GitLab API after %.2fs", interval.Seconds())
+ log.WithError(err).Errorf("Failed to connect to the internal GitLab API after %.2fs", maxElapsedTime.Seconds())
return
}
diff --git a/internal/source/gitlab/gitlab_poll_test.go b/internal/source/gitlab/gitlab_poll_test.go
index 6faaaa8a..8eecf210 100644
--- a/internal/source/gitlab/gitlab_poll_test.go
+++ b/internal/source/gitlab/gitlab_poll_test.go
@@ -68,7 +68,8 @@ func TestClient_Poll(t *testing.T) {
if tt.expectedFail {
require.False(t, glClient.isReady)
- require.Contains(t, hook.LastEntry().Message, "Failed to connect to the internal GitLab API after")
+ s := fmt.Sprintf("Failed to connect to the internal GitLab API after %.2fs", tt.maxTime.Seconds())
+ require.Equal(t, s, hook.LastEntry().Message)
return
}