diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go index e215e23ee6..09506d155a 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/k8s_resource_adds_test.go @@ -382,13 +382,12 @@ func TestDecorateEnvVars(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - assert.NoError(t, propellerCfg.SetConfig(&propellerCfg.Config{ - LiteralOffloadingConfig: propellerCfg.LiteralOffloadingConfig{ - Enabled: tt.offloadingEnabled, - MinSizeInMBForOffloading: 1, - MaxSizeInMBForOffloading: 42, - }, - })) + cfg := propellerCfg.GetConfig() + cfg.LiteralOffloadingConfig = propellerCfg.LiteralOffloadingConfig{ + Enabled: tt.offloadingEnabled, + MinSizeInMBForOffloading: 1, + MaxSizeInMBForOffloading: 42, + } assert.NoError(t, config.SetK8sPluginConfig(&config.K8sPluginConfig{ DefaultEnvVars: tt.additionEnvVar, diff --git a/flytepropeller/pkg/controller/config/config.go b/flytepropeller/pkg/controller/config/config.go index 24b8e0032a..4801b8993a 100644 --- a/flytepropeller/pkg/controller/config/config.go +++ b/flytepropeller/pkg/controller/config/config.go @@ -356,11 +356,6 @@ func GetConfig() *Config { return configSection.GetConfig().(*Config) } -// SetConfig should be used for TESTING ONLY as it sets current value for the config. -func SetConfig(cfg *Config) error { - return configSection.SetConfig(cfg) -} - // MustRegisterSubSection can be used to configure any subsections the the propeller configuration func MustRegisterSubSection(subSectionKey string, section config.Config) config.Section { return configSection.MustRegisterSection(subSectionKey, section)