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:
authorJaime Martinez <jmartinez@gitlab.com>2020-07-28 08:18:00 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-08-07 08:12:40 +0300
commit6c401a369e2a94c17c605750fec6dbd9f1c276a5 (patch)
treeb52cb1d1da3404e580d9f827782b13189a29611f
parent0ee194529b9c7b3d8a2d8859a24016e7a4d21a1d (diff)
Fix test assertions
-rw-r--r--internal/source/gitlab/gitlab_poll_test.go3
-rw-r--r--internal/source/source_mock.go6
2 files changed, 1 insertions, 8 deletions
diff --git a/internal/source/gitlab/gitlab_poll_test.go b/internal/source/gitlab/gitlab_poll_test.go
index 9a559015..6faaaa8a 100644
--- a/internal/source/gitlab/gitlab_poll_test.go
+++ b/internal/source/gitlab/gitlab_poll_test.go
@@ -68,8 +68,7 @@ func TestClient_Poll(t *testing.T) {
if tt.expectedFail {
require.False(t, glClient.isReady)
- s := fmt.Sprintf("\"Failed to connect to the internal GitLab API after %.2fs", tt.maxTime.Seconds())
- require.Equal(t, s, hook.LastEntry().Message)
+ require.Contains(t, hook.LastEntry().Message, "Failed to connect to the internal GitLab API after")
return
}
diff --git a/internal/source/source_mock.go b/internal/source/source_mock.go
index 4d67b0be..d7cd1533 100644
--- a/internal/source/source_mock.go
+++ b/internal/source/source_mock.go
@@ -30,12 +30,6 @@ func (m *MockSource) IsReady() bool {
return args.Get(0).(bool)
}
-func (m *MockSource) IsReady() bool {
- args := m.Called()
-
- return args.Get(0).(bool)
-}
-
// NewMockSource returns a new Source mock for testing
func NewMockSource() *MockSource {
return &MockSource{}