Avoid polluted-env problems in config tests [#34]

I mean...it's *possible* someone will have SECRET_WATER set in their
env, right? Might as well be paranoid; it doesn't cost much.
This commit is contained in:
Erin Call 2020-01-21 16:25:58 -08:00
parent 22aa1df894
commit dbcef2699e
No known key found for this signature in database
GPG key ID: 4071FF6C15B8DAD1

View file

@ -186,6 +186,7 @@ func (suite *ConfigTestSuite) TestLogDebugCensorsKubeToken() {
func (suite *ConfigTestSuite) TestNewConfigWithValuesSecrets() {
suite.unsetenv("VALUES")
suite.unsetenv("STRING_VALUES")
suite.unsetenv("SECRET_WATER")
suite.setenv("SECRET_FIRE", "Eru_Ilúvatar")
suite.setenv("SECRET_RINGS", "1")
suite.setenv("PLUGIN_VALUES", "fire=$SECRET_FIRE,water=${SECRET_WATER}")
@ -200,6 +201,7 @@ func (suite *ConfigTestSuite) TestNewConfigWithValuesSecrets() {
func (suite *ConfigTestSuite) TestValuesSecretsWithDebugLogging() {
suite.unsetenv("VALUES")
suite.unsetenv("SECRET_WATER")
suite.setenv("SECRET_FIRE", "Eru_Ilúvatar")
suite.setenv("PLUGIN_DEBUG", "true")
suite.setenv("PLUGIN_STRING_VALUES", "fire=$SECRET_FIRE")