Remove support for config overrides

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2024-09-27 13:19:23 +02:00
parent 79c59aeb7f
commit 6c5f4eea63
13 changed files with 28 additions and 271 deletions

View File

@@ -44,7 +44,7 @@ func New(opts ...Option) (engine.Interface, error) {
}
// AddRuntime adds a new runtime to the crio config
func (c *Config) AddRuntime(name string, path string, setAsDefault bool, _ ...map[string]interface{}) error {
func (c *Config) AddRuntime(name string, path string, setAsDefault bool) error {
if c == nil {
return fmt.Errorf("config is nil")
}

View File

@@ -27,12 +27,11 @@ import (
func TestAddRuntime(t *testing.T) {
logger, _ := testlog.NewNullLogger()
testCases := []struct {
description string
config string
setAsDefault bool
configOverrides []map[string]interface{}
expectedConfig string
expectedError error
description string
config string
setAsDefault bool
expectedConfig string
expectedError error
}{
{
description: "empty config not default runtime",
@@ -137,7 +136,7 @@ func TestAddRuntime(t *testing.T) {
Tree: config,
}
err = c.AddRuntime("test", "/usr/bin/test", tc.setAsDefault, tc.configOverrides...)
err = c.AddRuntime("test", "/usr/bin/test", tc.setAsDefault)
require.NoError(t, err)
require.EqualValues(t, expectedConfig.String(), config.String())