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-08-06 04:28:10 +0300
committerVladimir Shushlin <v.shushlin@gmail.com>2020-08-07 08:05:02 +0300
commit33e979201e75d251586347daf56fff12e611353d (patch)
tree412e72ec8a3a8d3e67d0cb0c0db70ebd535dd0a5 /internal/source/source_mock.go
parent6b87c7142f755d7202ecd474a17a524409b7d44f (diff)
Revert "Merge branch 'revert-a3365a7b' into 'master'"revert-185e0a0
This reverts commit 185e0a0e5c621f350335495291c535e5c05df89b, reversing changes made to a3365a7b1b41b3dee206cbcf27e915ee45d556a5.
Diffstat (limited to 'internal/source/source_mock.go')
-rw-r--r--internal/source/source_mock.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/source/source_mock.go b/internal/source/source_mock.go
index 7c693eb1..d7cd1533 100644
--- a/internal/source/source_mock.go
+++ b/internal/source/source_mock.go
@@ -14,8 +14,14 @@ type MockSource struct {
// GetDomain is a mocked function
func (m *MockSource) GetDomain(name string) (*domain.Domain, error) {
args := m.Called(name)
+ err := args.Error(1)
- return args.Get(0).(*domain.Domain), args.Error(1)
+ d, ok := args.Get(0).(*domain.Domain)
+ if !ok {
+ return nil, err
+ }
+
+ return d, err
}
func (m *MockSource) IsReady() bool {