Skip to content

Commit

Permalink
Remove SetConfig
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed Nov 19, 2024
1 parent 900121f commit 9b1f108
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 0 additions & 5 deletions flytepropeller/pkg/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b1f108

Please sign in to comment.