mirror of
https://github.com/pushbits/server.git
synced 2025-07-19 09:27:24 +02:00
move to separate config file for testing
This commit is contained in:
parent
d764733b59
commit
4e01354c90
4 changed files with 15 additions and 9 deletions
|
@ -4,6 +4,9 @@ import (
|
|||
"github.com/jinzhu/configor"
|
||||
)
|
||||
|
||||
// testMode indicates if the package is run in test mode
|
||||
var testMode bool
|
||||
|
||||
// Argon2Config holds the parameters used for creating hashes with Argon2.
|
||||
type Argon2Config struct {
|
||||
Memory uint32 `default:"131072"`
|
||||
|
@ -55,6 +58,9 @@ type Configuration struct {
|
|||
}
|
||||
|
||||
func configFiles() []string {
|
||||
if testMode {
|
||||
return []string{"config_unittest.yml"}
|
||||
}
|
||||
return []string{"config.yml"}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue