diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2019-04-25 10:19:34 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2019-05-01 14:51:39 +0300 |
commit | 8886eb709e290baa6f526dffffe8de9bd4badbbb (patch) | |
tree | 8201cdfb5e9d51bc73c99c6a4181d30fa03ad1ac /go/internal/config/config_test.go | |
parent | 344cc6b443e08ec5648fcf8a3035e46bb404fd6a (diff) | |
download | gitlab-shell-id-api-https.tar.gz |
Support calling internal API using HTTPSid-api-https
Diffstat (limited to 'go/internal/config/config_test.go')
-rw-r--r-- | go/internal/config/config_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/go/internal/config/config_test.go b/go/internal/config/config_test.go index d48d3db..aefc145 100644 --- a/go/internal/config/config_test.go +++ b/go/internal/config/config_test.go @@ -94,6 +94,13 @@ func TestParseConfig(t *testing.T) { secret: "default-secret-content", httpSettings: HttpSettingsConfig{User: "user_basic_auth", Password: "password_basic_auth", ReadTimeoutSeconds: 500}, }, + { + yaml: "http_settings:\n ca_file: /etc/ssl/cert.pem\n ca_path: /etc/pki/tls/certs\n self_signed_cert: true", + path: path.Join(testRoot, "gitlab-shell.log"), + format: "text", + secret: "default-secret-content", + httpSettings: HttpSettingsConfig{CaFile: "/etc/ssl/cert.pem", CaPath: "/etc/pki/tls/certs", SelfSignedCert: true}, + }, } for _, tc := range testCases { @@ -158,13 +165,13 @@ func TestFeatureEnabled(t *testing.T) { expectEnabled: true, }, { - desc: "When the protocol is not supported", + desc: "When the protocol is https and the feature enabled", config: &Config{ GitlabUrl: "https://localhost:3000", Migration: MigrationConfig{Enabled: true, Features: []string{"discover"}}, }, feature: "discover", - expectEnabled: false, + expectEnabled: true, }, } |