aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/app/config_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin/internal/app/config_test.go')
-rw-r--r--src/k8splugin/internal/app/config_test.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/k8splugin/internal/app/config_test.go b/src/k8splugin/internal/app/config_test.go
index 1aef6656..3b673b86 100644
--- a/src/k8splugin/internal/app/config_test.go
+++ b/src/k8splugin/internal/app/config_test.go
@@ -138,20 +138,23 @@ func TestRollbackConfig(t *testing.T) {
profileName: "testprofile1",
instanceID: "testinstance1",
inp: Config{
- ConfigName: "testconfig1",
- TemplateName: "testtemplate1",
+ ConfigName: "testconfig1",
+ TemplateName: "testtemplate1",
+ ConfigVersion: 1,
Values: map[string]interface{}{
"values": "{\"namespace\": \"kafka\", \"topic\": {\"name\":\"orders\", \"cluster\":\"my-cluster\", \"partitions\": 10,\"replicas\": 2, }}"},
},
inpUpdate1: Config{
- ConfigName: "testconfig1",
- TemplateName: "testtemplate1",
+ ConfigName: "testconfig1",
+ TemplateName: "testtemplate1",
+ ConfigVersion: 2,
Values: map[string]interface{}{
"values": "{\"namespace\": \"kafka\", \"topic\": {\"name\":\"orders\", \"cluster\":\"my-cluster\", \"partitions\": 20,\"replicas\": 2, }}"},
},
inpUpdate2: Config{
- ConfigName: "testconfig1",
- TemplateName: "testtemplate1",
+ ConfigName: "testconfig1",
+ TemplateName: "testtemplate1",
+ ConfigVersion: 3,
Values: map[string]interface{}{
"values": "{\"namespace\": \"kafka\", \"topic\": {\"name\":\"orders\", \"cluster\":\"my-cluster\", \"partitions\": 30,\"replicas\": 2, }}"},
},
@@ -293,7 +296,7 @@ func TestRollbackConfig(t *testing.T) {
}
}
testCase.rollbackConfig.AnyOf.ConfigVersion = "2"
- err = impl.Rollback(testCase.instanceID, testCase.inp.ConfigName, testCase.rollbackConfig)
+ _, err = impl.Rollback(testCase.instanceID, testCase.inp.ConfigName, testCase.rollbackConfig, false)
if err != nil {
if testCase.expectedError == "" {
t.Fatalf("Create returned an unexpected error %s", err)