mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
add test for setting secret through env var
This commit is contained in:
parent
dfbe15636d
commit
47c6dc3ab7
@ -12,6 +12,13 @@ func TestParse(t *testing.T) {
|
||||
t.Errorf("expected secret, got empty string")
|
||||
}
|
||||
|
||||
secret := "my-super-secret-string"
|
||||
os.Setenv("FATHOM_SECRET", secret)
|
||||
cfg = Parse("")
|
||||
if cfg.Secret != secret {
|
||||
t.Errorf("Expected %#v, got %#v", secret, cfg.Secret)
|
||||
}
|
||||
|
||||
os.Setenv("FATHOM_DATABASE_DRIVER", "sqlite")
|
||||
cfg = Parse("")
|
||||
if cfg.Database.Driver != "sqlite3" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user