Test settings aliases without the plugin_ prefix [#66]
This commit is contained in:
parent
71421fbaa5
commit
a826f66425
|
@ -105,6 +105,17 @@ func (suite *ConfigTestSuite) TestNewConfigWithAliases() {
|
||||||
suite.Equal("d2l0aCBpdHMgaGVhZA==", cfg.Certificate, "Certificate should be aliased")
|
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() {
|
func (suite *ConfigTestSuite) TestNewConfigWithAliasConflicts() {
|
||||||
suite.unsetenv("FORCE_UPGRADE")
|
suite.unsetenv("FORCE_UPGRADE")
|
||||||
suite.setenv("PLUGIN_FORCE", "true")
|
suite.setenv("PLUGIN_FORCE", "true")
|
||||||
|
|
Loading…
Reference in a new issue