As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit 5d8d00fb authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Support new ssl_cert_dir config setting

parent 86e99068
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -27,6 +27,10 @@ http_settings:
# File used as authorized_keys for gitlab user
auth_file: "/home/git/.ssh/authorized_keys"
# SSL certificate dir where custom certificates can be placed
# https://golang.org/pkg/crypto/x509/
# ssl_cert_dir: /opt/gitlab/embedded/ssl/certs/
# File that contains the secret key for verifying access to GitLab.
# Default is .gitlab_shell_secret in the gitlab-shell directory.
# secret_file: "/home/git/gitlab-shell/.gitlab_shell_secret"
Loading
Loading
Loading
Loading
@@ -34,6 +34,7 @@ type Config struct {
GitlabTracing string `yaml:"gitlab_tracing"`
SecretFilePath string `yaml:"secret_file"`
Secret string `yaml:"secret"`
SslCertDir string `yaml:"ssl_cert_dir"`
HttpSettings HttpSettingsConfig `yaml:"http_settings"`
HttpClient *client.HttpClient
}
Loading
Loading
Loading
Loading
@@ -29,6 +29,7 @@ func TestParseConfig(t *testing.T) {
format string
gitlabUrl string
secret string
sslCertDir string
httpSettings HttpSettingsConfig
}{
{
Loading
Loading
@@ -79,6 +80,13 @@ func TestParseConfig(t *testing.T) {
format: "text",
secret: "an inline secret",
},
{
yaml: "ssl_cert_dir: /tmp/certs",
path: path.Join(testRoot, "gitlab-shell.log"),
format: "text",
secret: "default-secret-content",
sslCertDir: "/tmp/certs",
},
{
yaml: "http_settings:\n user: user_basic_auth\n password: password_basic_auth\n read_timeout: 500",
path: path.Join(testRoot, "gitlab-shell.log"),
Loading
Loading
@@ -106,6 +114,7 @@ func TestParseConfig(t *testing.T) {
assert.Equal(t, tc.format, cfg.LogFormat)
assert.Equal(t, tc.gitlabUrl, cfg.GitlabUrl)
assert.Equal(t, tc.secret, cfg.Secret)
assert.Equal(t, tc.sslCertDir, cfg.SslCertDir)
assert.Equal(t, tc.httpSettings, cfg.HttpSettings)
})
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment