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:
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{}
-}