diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-01-16 07:09:40 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-01-16 07:09:40 +0300 |
commit | 5ad5ce21559f55b902903bb6370d25d6a0bccdf5 (patch) | |
tree | bc6c9263cc8a93ab1fb5bcd60733ed50d6f65c38 /internal/source | |
parent | 9e8252199cfe9968c23008b8154b394f03f025e1 (diff) |
add connection timeout and jwt expiry to mock
Diffstat (limited to 'internal/source')
-rw-r--r-- | internal/source/domains_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/source/domains_test.go b/internal/source/domains_test.go index 5fea6ae3..72c1b2f3 100644 --- a/internal/source/domains_test.go +++ b/internal/source/domains_test.go @@ -2,6 +2,7 @@ package source import ( "testing" + "time" "github.com/stretchr/testify/require" @@ -21,6 +22,13 @@ func (c sourceConfig) GitlabServerURL() string { func (c sourceConfig) GitlabAPISecret() []byte { return []byte(c.secret) } +func (c sourceConfig) GitlabClientConnectionTimeout() time.Duration { + return 10 * time.Second +} + +func (c sourceConfig) GitlabJWTTokenTimeout() time.Duration { + return 30 * time.Second +} func TestDomainSources(t *testing.T) { t.Run("when GitLab API URL has been provided", func(t *testing.T) { |