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:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-07-25 16:24:03 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-09-09 14:06:29 +0300
commitd08da349a24cb0ec322eae287fcc27ce8730bba9 (patch)
tree0b64732f5c98725a9ab60e8e7e118d455877c788 /internal/source/source_mock.go
parent6b9b03db88911c9939d5fc1d92d4b15912cc7665 (diff)
test: update source mock to use mockgen
Diffstat (limited to 'internal/source/source_mock.go')
-rw-r--r--internal/source/source_mock.go38
1 files changed, 0 insertions, 38 deletions
diff --git a/internal/source/source_mock.go b/internal/source/source_mock.go
deleted file mode 100644
index 67e80833..00000000
--- a/internal/source/source_mock.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package source
-
-import (
- "context"
-
- "github.com/stretchr/testify/mock"
-
- "gitlab.com/gitlab-org/gitlab-pages/internal/domain"
-)
-
-// MockSource can be used for testing
-type MockSource struct {
- mock.Mock
-}
-
-// GetDomain is a mocked function
-func (m *MockSource) GetDomain(ctx context.Context, name string) (*domain.Domain, error) {
- args := m.Called(name)
- err := args.Error(1)
-
- d, ok := args.Get(0).(*domain.Domain)
- if !ok {
- return nil, err
- }
-
- return d, err
-}
-
-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{}
-}