ficsit-cli-flake/cfg/test_defaults.go

21 lines
717 B
Go
Raw Normal View History

2021-12-02 04:00:33 +00:00
package cfg
import (
"path/filepath"
"runtime"
"github.com/spf13/viper"
)
func SetDefaults() {
_, file, _, _ := runtime.Caller(0)
viper.SetDefault("cache-dir", filepath.Clean(filepath.Join(filepath.Dir(file), "../", "testdata", "cache")))
2022-04-14 01:27:39 +00:00
viper.SetDefault("local-dir", filepath.Clean(filepath.Join(filepath.Dir(file), "../", "testdata", "local")))
viper.SetDefault("base-local-dir", filepath.Clean(filepath.Join(filepath.Dir(file), "../", "testdata")))
2021-12-02 04:00:33 +00:00
viper.SetDefault("profiles-file", "profiles.json")
viper.SetDefault("installations-file", "installations.json")
viper.SetDefault("dry-run", false)
2022-05-02 20:07:15 +00:00
viper.SetDefault("api-base", "https://api.ficsit.app")
viper.SetDefault("graphql-api", "/v2/query")
2021-12-02 04:00:33 +00:00
}