diff options
Diffstat (limited to 'internal/configloader/configloader_test.go')
| -rw-r--r-- | internal/configloader/configloader_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/configloader/configloader_test.go b/internal/configloader/configloader_test.go index 0c89672..6a27d86 100644 --- a/internal/configloader/configloader_test.go +++ b/internal/configloader/configloader_test.go @@ -36,6 +36,7 @@ func TestNewConfigWithInvalidVersionStyle(t *testing.T) { func TestNewConfigFindsFileAndPopulatesConfigStruct(t *testing.T) { bolttest.UnsetEnv(t, "BOLT_DB_CONN_HOST") + bolttest.UnsetEnv(t, "BOLT_DB_CONN_PORT") bolttest.UnsetEnv(t, "BOLT_DB_CONN_USER") bolttest.UnsetEnv(t, "BOLT_DB_CONN_PASSWORD") bolttest.UnsetEnv(t, "BOLT_DB_CONN_DBNAME") @@ -49,6 +50,7 @@ func TestNewConfigFindsFileAndPopulatesConfigStruct(t *testing.T) { }, Connection: configloader.ConnectionConfig{ Host: "testhost", + Port: "1234", User: "testuser", Password: "testpassword", DBName: "testdb", @@ -73,6 +75,7 @@ func TestNewConfigCanBeOverridenByEnvVars(t *testing.T) { }, Connection: configloader.ConnectionConfig{ Host: "testhost", + Port: "1234", User: "testuser", Password: "testpassword", DBName: "testdb", @@ -88,6 +91,7 @@ func TestNewConfigCanBeOverridenByEnvVars(t *testing.T) { }, Connection: configloader.ConnectionConfig{ Host: "envtesthost", + Port: "4321", User: "envtestuser", Password: "envtestpassword", DBName: "envtestdb", @@ -97,6 +101,7 @@ func TestNewConfigCanBeOverridenByEnvVars(t *testing.T) { t.Setenv("BOLT_MIGRATIONS_VERSION_STYLE", string(envCfg.Migrations.VersionStyle)) t.Setenv("BOLT_MIGRATIONS_DIR_PATH", envCfg.Migrations.DirectoryPath) t.Setenv("BOLT_DB_CONN_HOST", envCfg.Connection.Host) + t.Setenv("BOLT_DB_CONN_PORT", envCfg.Connection.Port) t.Setenv("BOLT_DB_CONN_USER", envCfg.Connection.User) t.Setenv("BOLT_DB_CONN_PASSWORD", envCfg.Connection.Password) t.Setenv("BOLT_DB_CONN_DBNAME", envCfg.Connection.DBName) @@ -109,6 +114,7 @@ func TestNewConfigCanBeOverridenByEnvVars(t *testing.T) { func TestNewConfigSearchesParentDirectories(t *testing.T) { bolttest.UnsetEnv(t, "BOLT_DB_CONN_HOST") + bolttest.UnsetEnv(t, "BOLT_DB_CONN_PORT") bolttest.UnsetEnv(t, "BOLT_DB_CONN_USER") bolttest.UnsetEnv(t, "BOLT_DB_CONN_PASSWORD") bolttest.UnsetEnv(t, "BOLT_DB_CONN_DBNAME") |