From a826f66425fb996a4fac47a9266de9a72d55c5b3 Mon Sep 17 00:00:00 2001 From: Erin Call Date: Wed, 8 Jan 2020 12:37:34 -0800 Subject: [PATCH] Test settings aliases without the plugin_ prefix [#66] --- internal/helm/config_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/helm/config_test.go b/internal/helm/config_test.go index 4f4916b..13bf22a 100644 --- a/internal/helm/config_test.go +++ b/internal/helm/config_test.go @@ -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")