Test settings aliases without the plugin_ prefix [#66]

This commit is contained in:
Erin Call 2020-01-08 12:37:34 -08:00
parent 71421fbaa5
commit a826f66425
No known key found for this signature in database
GPG key ID: 4071FF6C15B8DAD1

View file

@ -105,6 +105,17 @@ func (suite *ConfigTestSuite) TestNewConfigWithAliases() {
suite.Equal("d2l0aCBpdHMgaGVhZA==", cfg.Certificate, "Certificate should be aliased")
}
func (suite *ConfigTestSuite) TestAliasedSettingWithoutPluginPrefix() {
suite.unsetenv("FORCE_UPGRADE")
suite.unsetenv("PLUGIN_FORCE_UPGRADE")
suite.unsetenv("PLUGIN_FORCE")
suite.setenv("FORCE", "true")
cfg, err := NewConfig(&strings.Builder{}, &strings.Builder{})
suite.Require().NoError(err)
suite.True(cfg.Force)
}
func (suite *ConfigTestSuite) TestNewConfigWithAliasConflicts() {
suite.unsetenv("FORCE_UPGRADE")
suite.setenv("PLUGIN_FORCE", "true")