Config package for environment overloaded by flag configuration
This commit is contained in:
16
config/config_test.go
Normal file
16
config/config_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_Config(t *testing.T) {
|
||||
was := os.Getenv("DBPATH")
|
||||
defer os.Setenv("DBPATH", was)
|
||||
os.Setenv("DBPATH", "filler")
|
||||
c := New()
|
||||
if c.DBPath != "filler" {
|
||||
t.Errorf("DBPATH not overridden by env")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user