Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config_test.go')
-rw-r--r--internal/config/config_test.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index 7785dbcde..9827a2668 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -14,6 +14,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+
+ "gitlab.com/gitlab-org/gitaly/internal/config/sentry"
)
func configFileReader(content string) io.Reader {
@@ -93,6 +95,29 @@ path="/tmp/repos2"`)
}
}
+func TestLoadSentry(t *testing.T) {
+ tmpFile := configFileReader(`[logging]
+sentry_environment = "production"
+sentry_dsn = "abc123"
+ruby_sentry_dsn = "xyz456"`)
+
+ err := Load(tmpFile)
+ assert.NoError(t, err)
+
+ expectedConf := Cfg{
+ Logging: Logging{
+ Sentry: Sentry(sentry.Config{
+ Environment: "production",
+ DSN: "abc123",
+ }),
+ RubySentryDSN: "xyz456",
+ },
+ }
+ expectedConf.setDefaults()
+
+ assert.Equal(t, expectedConf, Config)
+}
+
func TestLoadPrometheus(t *testing.T) {
tmpFile := configFileReader(`prometheus_listen_addr=":9236"`)