pull/263/head
crapStone 2023-11-19 23:56:56 +01:00
rodzic 5ed4ca2500
commit 7b3a09d8ac
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: D74B82E7CDD863FE
2 zmienionych plików z 18 dodań i 15 usunięć

Wyświetl plik

@ -74,21 +74,19 @@ func TestReadConfigShouldReturnConfigFromFileWhenConfigArgPresent(t *testing.T)
runApp(
t,
func(ctx *cli.Context) error {
content, err := os.ReadFile("assets/test_config.toml")
if err != nil {
return err
}
expectedConfig := &Config{}
err = toml.Unmarshal(content, expectedConfig)
if err != nil {
return err
}
cfg, err := ReadConfig(ctx)
if err != nil {
return err
}
expectedConfig, err := readTestConfig()
if err != nil {
return err
}
assert.Equal(t, expectedConfig, cfg)
return err
return nil
},
[]string{"--config-file", "assets/test_config.toml"},
)
@ -99,6 +97,9 @@ func TestValuesReadFromConfigFileShouldBeOverwrittenByArgs(t *testing.T) {
t,
func(ctx *cli.Context) error {
cfg, err := ReadConfig(ctx)
if err != nil {
return err
}
MergeConfig(ctx, cfg)
@ -115,7 +116,7 @@ func TestValuesReadFromConfigFileShouldBeOverwrittenByArgs(t *testing.T) {
assert.Equal(t, expectedConfig, cfg)
return err
return nil
},
[]string{
"--config-file", "assets/test_config.toml",

Wyświetl plik

@ -1,13 +1,15 @@
# specify at which log level should be logged
# Possible options: trace, debug, info, warn, error
logLevel = 'debug'
[server]
host = '127.0.0.1'
port = 443
httpPort = 80
httpServerEnabled = false
httpServerEnabled = true
mainDomain = ''
rawDomain = ''
allowedCorsDomains = ['asdf', 'jkl;']
allowedCorsDomains = []
blacklistedPaths = []
[gitea]