From d0728676ee7a7b4e9eebe4b4724a08c5923e6ff1 Mon Sep 17 00:00:00 2001 From: Vlad Klokun Date: Tue, 10 Jan 2023 18:59:39 +0200 Subject: [PATCH] tests: re-organize autofixing unit tests This change: - Changes test data naming convention to be lexicographically sortable and have input and expected data side-by-side. - Executes each test case in a separate run. --- core/pkg/fixhandler/fixhandler_test.go | 94 ++++++++++--------- .../tc-01-00-input.yaml} | 2 +- .../tc-01-01-expected.yaml} | 2 +- .../tc-01-00-input.yaml} | 2 +- .../tc-01-01-expected.yaml} | 2 +- .../tc-02-00-input.yaml} | 0 .../tc-02-01-expected.yaml} | 0 .../tc-03-00-input.yaml} | 0 .../tc-03-01-expected.yaml} | 0 .../tc-04-00-input.yaml} | 0 .../tc-04-01-expected.yaml} | 0 .../tc-05-00-input.yaml} | 0 .../tc-05-01-expected.yaml} | 0 .../tc-06-00-input.yaml} | 0 .../tc-06-01-expected.yaml} | 0 .../tc-07-00-input.yaml} | 0 .../tc-07-01-expected.yaml} | 0 .../tc-01-00-input.yaml} | 0 .../tc-01-01-expected.yaml} | 0 .../tc-02-00-input.yaml} | 0 .../tc-02-01-expected.yaml} | 0 .../tc-03-00-input.yaml} | 0 .../tc-03-01-expected.yaml} | 0 .../tc-04-00-input.yaml} | 0 .../tc-04-01-expected.yaml} | 0 .../tc-01-00-input.yaml} | 0 .../tc-01-01-expected.yaml} | 0 .../tc-02-00-input.yaml} | 0 .../tc-02-01-expected.yaml} | 0 29 files changed, 56 insertions(+), 46 deletions(-) rename core/pkg/fixhandler/testdata/{hybrid_scenarios/original_yaml_scenario_1.yml => hybrids/tc-01-00-input.yaml} (93%) rename core/pkg/fixhandler/testdata/{hybrid_scenarios/fixed_yaml_scenario_1.yml => hybrids/tc-01-01-expected.yaml} (93%) rename core/pkg/fixhandler/testdata/{insert_scenarios/original_yaml_scenario_1.yml => inserts/tc-01-00-input.yaml} (92%) rename core/pkg/fixhandler/testdata/{insert_scenarios/fixed_yaml_scenario_1.yml => inserts/tc-01-01-expected.yaml} (87%) rename core/pkg/fixhandler/testdata/{insert_scenarios/original_yaml_scenario_2.yml => inserts/tc-02-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/fixed_yaml_scenario_2.yml => inserts/tc-02-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/original_yaml_scenario_3.yml => inserts/tc-03-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/fixed_yaml_scenario_3.yml => inserts/tc-03-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/original_yaml_scenario_4.yml => inserts/tc-04-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/fixed_yaml_scenario_4.yml => inserts/tc-04-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/original_yaml_scenario_5.yml => inserts/tc-05-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/fixed_yaml_scenario_5.yml => inserts/tc-05-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/original_yaml_scenario_6.yml => inserts/tc-06-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/fixed_yaml_scenario_6.yml => inserts/tc-06-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/original_yaml_scenario_7.yml => inserts/tc-07-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{insert_scenarios/fixed_yaml_scenario_7.yml => inserts/tc-07-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{remove_scenarios/original_yaml_scenario_1.yml => removals/tc-01-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{remove_scenarios/fixed_yaml_scenario_1.yml => removals/tc-01-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{remove_scenarios/original_yaml_scenario_2.yml => removals/tc-02-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{remove_scenarios/fixed_yaml_scenario_2.yml => removals/tc-02-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{remove_scenarios/original_yaml_scenario_3.yml => removals/tc-03-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{remove_scenarios/fixed_yaml_scenario_3.yml => removals/tc-03-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{remove_scenarios/original_yaml_scenario_4.yml => removals/tc-04-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{remove_scenarios/fixed_yaml_scenario_4.yml => removals/tc-04-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{replace_scenarios/original_yaml_scenario_1.yml => replaces/tc-01-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{replace_scenarios/fixed_yaml_scenario_1.yml => replaces/tc-01-01-expected.yaml} (100%) rename core/pkg/fixhandler/testdata/{replace_scenarios/original_yaml_scenario_2.yml => replaces/tc-02-00-input.yaml} (100%) rename core/pkg/fixhandler/testdata/{replace_scenarios/fixed_yaml_scenario_2.yml => replaces/tc-02-01-expected.yaml} (100%) diff --git a/core/pkg/fixhandler/fixhandler_test.go b/core/pkg/fixhandler/fixhandler_test.go index 0323241b..2cdcd1fe 100644 --- a/core/pkg/fixhandler/fixhandler_test.go +++ b/core/pkg/fixhandler/fixhandler_test.go @@ -39,22 +39,22 @@ func getTestCases() []indentationTestCase { indentationTestCases := []indentationTestCase{ // Insertion Scenarios { - "insert_scenarios/original_yaml_scenario_1.yml", + "inserts/tc-01-00-input.yaml", "select(di==0).spec.containers[0].securityContext.allowPrivilegeEscalation |= false", - "insert_scenarios/fixed_yaml_scenario_1.yml", + "inserts/tc-01-01-expected.yaml", }, { - "insert_scenarios/original_yaml_scenario_2.yml", + "inserts/tc-02-00-input.yaml", "select(di==0).spec.containers[0].securityContext.capabilities.drop += [\"NET_RAW\"]", - "insert_scenarios/fixed_yaml_scenario_2.yml", + "inserts/tc-02-01-expected.yaml", }, { - "insert_scenarios/original_yaml_scenario_3.yml", + "inserts/tc-03-00-input.yaml", "select(di==0).spec.containers[0].securityContext.capabilities.drop += [\"SYS_ADM\"]", - "insert_scenarios/fixed_yaml_scenario_3.yml", + "inserts/tc-03-01-expected.yaml", }, { - "insert_scenarios/original_yaml_scenario_4.yml", + "inserts/tc-04-00-input.yaml", `select(di==0).spec.template.spec.securityContext.allowPrivilegeEscalation |= false | select(di==0).spec.template.spec.containers[0].securityContext.capabilities.drop += ["NET_RAW"] | @@ -62,70 +62,69 @@ func getTestCases() []indentationTestCase { select(di==0).spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation |= false | select(di==0).spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem |= true`, - "insert_scenarios/fixed_yaml_scenario_4.yml", + "inserts/tc-04-01-expected.yaml", }, { - "insert_scenarios/original_yaml_scenario_5.yml", + "inserts/tc-05-00-input.yaml", "select(di==0).spec.containers[0].securityContext.allowPrivilegeEscalation |= false", - "insert_scenarios/fixed_yaml_scenario_5.yml", + "inserts/tc-05-01-expected.yaml", }, { - "insert_scenarios/original_yaml_scenario_6.yml", + "inserts/tc-06-00-input.yaml", "select(di==0).spec.containers[0].securityContext.capabilities.drop += [\"SYS_ADM\"]", - "insert_scenarios/fixed_yaml_scenario_6.yml", + "inserts/tc-06-01-expected.yaml", }, { - "insert_scenarios/original_yaml_scenario_7.yml", + "inserts/tc-07-00-input.yaml", `select(di==0).spec.containers[0].securityContext.allowPrivilegeEscalation |= false | select(di==1).spec.containers[0].securityContext.allowPrivilegeEscalation |= false`, - "insert_scenarios/fixed_yaml_scenario_7.yml", + "inserts/tc-07-01-expected.yaml", }, // Removal Scenarios - { - "remove_scenarios/original_yaml_scenario_1.yml", + "removals/tc-01-00-input.yaml", "del(select(di==0).spec.containers[0].securityContext)", - "remove_scenarios/fixed_yaml_scenario_1.yml", + "removals/tc-01-01-expected.yaml", }, { - "remove_scenarios/original_yaml_scenario_2.yml", + "removals/tc-02-00-input.yaml", "del(select(di==0).spec.containers[1])", - "remove_scenarios/fixed_yaml_scenario_2.yml", + "removals/tc-02-01-expected.yaml", }, { - "remove_scenarios/original_yaml_scenario_3.yml", + "removals/tc-03-00-input.yaml", "del(select(di==0).spec.containers[0].securityContext.capabilities.drop[1])", - "remove_scenarios/fixed_yaml_scenario_3.yml", + "removals/tc-03-01-expected.yaml", }, { - "remove_scenarios/original_yaml_scenario_4.yml", + "removes/tc-04-00-input.yaml", `del(select(di==0).spec.containers[0].securityContext) | del(select(di==1).spec.containers[1])`, - "remove_scenarios/fixed_yaml_scenario_4.yml", + "removes/tc-04-01-expected.yaml", }, // Replace Scenarios { - "replace_scenarios/original_yaml_scenario_1.yml", + "replaces/tc-01-00-input.yaml", "select(di==0).spec.containers[0].securityContext.runAsRoot |= false", - "replace_scenarios/fixed_yaml_scenario_1.yml", + "replaces/tc-01-01-expected.yaml", }, { - "replace_scenarios/original_yaml_scenario_2.yml", + "replaces/tc-02-00-input.yaml", `select(di==0).spec.containers[0].securityContext.capabilities.drop[0] |= "SYS_ADM" | select(di==0).spec.containers[0].securityContext.capabilities.add[0] |= "NET_RAW"`, - "replace_scenarios/fixed_yaml_scenario_2.yml", + "replaces/tc-02-01-expected.yaml", }, // Hybrid Scenarios { - "hybrid_scenarios/original_yaml_scenario_1.yml", + "hybrids/tc-01-00-input.yaml", `del(select(di==0).spec.containers[0].securityContext) | select(di==0).spec.securityContext.runAsRoot |= false`, - "hybrid_scenarios/fixed_yaml_scenario_1.yml", + "hybrids/tc-01-01-expected.yaml", }, } @@ -136,23 +135,34 @@ func TestApplyFixKeepsIndentation(t *testing.T) { testCases := getTestCases() for _, tc := range testCases { - getTestDataPath := func(filename string) string { - currentDir, _ := os.Getwd() - currentFile := "testdata/" + filename - return filepath.Join(currentDir, currentFile) - } + t.Run(tc.inputFile, func(t *testing.T) { + getTestDataPath := func(filename string) string { + currentDir, _ := os.Getwd() + currentFile := "testdata/" + filename + return filepath.Join(currentDir, currentFile) + } - input, _ := os.ReadFile(getTestDataPath(tc.inputFile)) - want, _ := os.ReadFile(getTestDataPath(tc.expectedFile)) - expression := tc.yamlExpression + input, _ := os.ReadFile(getTestDataPath(tc.inputFile)) + want, _ := os.ReadFile(getTestDataPath(tc.expectedFile)) + expression := tc.yamlExpression - h, _ := NewFixHandlerMock() + h, _ := NewFixHandlerMock() - got, _ := h.ApplyFixToContent(string(input), expression) + got, _ := h.ApplyFixToContent(string(input), expression) - if got != string(want) { - t.Errorf("Fixed file does not match the expected.\n FilePath: %s \n\nGot:\n <%s>\n\n\nWant:\n<%s>", tc.inputFile, got, want) - } + if got != string(want) { + t.Errorf( + "Contents of the fixed file don't match the expectation.\n"+ + "FilePath: %s\n\n"+ + "Got:\n<%s>\n\n"+ + "Want:\n<%s>", + tc.inputFile, + got, + want, + ) + } + }, + ) } } diff --git a/core/pkg/fixhandler/testdata/hybrid_scenarios/original_yaml_scenario_1.yml b/core/pkg/fixhandler/testdata/hybrids/tc-01-00-input.yaml similarity index 93% rename from core/pkg/fixhandler/testdata/hybrid_scenarios/original_yaml_scenario_1.yml rename to core/pkg/fixhandler/testdata/hybrids/tc-01-00-input.yaml index c2afc6bd..f8f5b61a 100644 --- a/core/pkg/fixhandler/testdata/hybrid_scenarios/original_yaml_scenario_1.yml +++ b/core/pkg/fixhandler/testdata/hybrids/tc-01-00-input.yaml @@ -16,4 +16,4 @@ spec: - name: nginx_container image: nginx securityContext: - runAsRoot: true \ No newline at end of file + runAsRoot: true diff --git a/core/pkg/fixhandler/testdata/hybrid_scenarios/fixed_yaml_scenario_1.yml b/core/pkg/fixhandler/testdata/hybrids/tc-01-01-expected.yaml similarity index 93% rename from core/pkg/fixhandler/testdata/hybrid_scenarios/fixed_yaml_scenario_1.yml rename to core/pkg/fixhandler/testdata/hybrids/tc-01-01-expected.yaml index 5ab9f08c..b74c6cdc 100644 --- a/core/pkg/fixhandler/testdata/hybrid_scenarios/fixed_yaml_scenario_1.yml +++ b/core/pkg/fixhandler/testdata/hybrids/tc-01-01-expected.yaml @@ -16,4 +16,4 @@ spec: - name: nginx_container image: nginx securityContext: - runAsRoot: false \ No newline at end of file + runAsRoot: false diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_1.yml b/core/pkg/fixhandler/testdata/inserts/tc-01-00-input.yaml similarity index 92% rename from core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_1.yml rename to core/pkg/fixhandler/testdata/inserts/tc-01-00-input.yaml index 7c15eec3..c6be2de9 100644 --- a/core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_1.yml +++ b/core/pkg/fixhandler/testdata/inserts/tc-01-00-input.yaml @@ -9,4 +9,4 @@ metadata: spec: containers: - name: nginx_container - image: nginx \ No newline at end of file + image: nginx diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_1.yml b/core/pkg/fixhandler/testdata/inserts/tc-01-01-expected.yaml similarity index 87% rename from core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_1.yml rename to core/pkg/fixhandler/testdata/inserts/tc-01-01-expected.yaml index 55f3aeb5..dbe3c81e 100644 --- a/core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_1.yml +++ b/core/pkg/fixhandler/testdata/inserts/tc-01-01-expected.yaml @@ -11,4 +11,4 @@ spec: - name: nginx_container image: nginx securityContext: - allowPrivilegeEscalation: false \ No newline at end of file + allowPrivilegeEscalation: false diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_2.yml b/core/pkg/fixhandler/testdata/inserts/tc-02-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_2.yml rename to core/pkg/fixhandler/testdata/inserts/tc-02-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_2.yml b/core/pkg/fixhandler/testdata/inserts/tc-02-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_2.yml rename to core/pkg/fixhandler/testdata/inserts/tc-02-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_3.yml b/core/pkg/fixhandler/testdata/inserts/tc-03-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_3.yml rename to core/pkg/fixhandler/testdata/inserts/tc-03-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_3.yml b/core/pkg/fixhandler/testdata/inserts/tc-03-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_3.yml rename to core/pkg/fixhandler/testdata/inserts/tc-03-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_4.yml b/core/pkg/fixhandler/testdata/inserts/tc-04-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_4.yml rename to core/pkg/fixhandler/testdata/inserts/tc-04-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_4.yml b/core/pkg/fixhandler/testdata/inserts/tc-04-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_4.yml rename to core/pkg/fixhandler/testdata/inserts/tc-04-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_5.yml b/core/pkg/fixhandler/testdata/inserts/tc-05-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_5.yml rename to core/pkg/fixhandler/testdata/inserts/tc-05-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_5.yml b/core/pkg/fixhandler/testdata/inserts/tc-05-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_5.yml rename to core/pkg/fixhandler/testdata/inserts/tc-05-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_6.yml b/core/pkg/fixhandler/testdata/inserts/tc-06-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_6.yml rename to core/pkg/fixhandler/testdata/inserts/tc-06-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_6.yml b/core/pkg/fixhandler/testdata/inserts/tc-06-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_6.yml rename to core/pkg/fixhandler/testdata/inserts/tc-06-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_7.yml b/core/pkg/fixhandler/testdata/inserts/tc-07-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/original_yaml_scenario_7.yml rename to core/pkg/fixhandler/testdata/inserts/tc-07-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_7.yml b/core/pkg/fixhandler/testdata/inserts/tc-07-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/insert_scenarios/fixed_yaml_scenario_7.yml rename to core/pkg/fixhandler/testdata/inserts/tc-07-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/remove_scenarios/original_yaml_scenario_1.yml b/core/pkg/fixhandler/testdata/removals/tc-01-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/remove_scenarios/original_yaml_scenario_1.yml rename to core/pkg/fixhandler/testdata/removals/tc-01-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/remove_scenarios/fixed_yaml_scenario_1.yml b/core/pkg/fixhandler/testdata/removals/tc-01-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/remove_scenarios/fixed_yaml_scenario_1.yml rename to core/pkg/fixhandler/testdata/removals/tc-01-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/remove_scenarios/original_yaml_scenario_2.yml b/core/pkg/fixhandler/testdata/removals/tc-02-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/remove_scenarios/original_yaml_scenario_2.yml rename to core/pkg/fixhandler/testdata/removals/tc-02-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/remove_scenarios/fixed_yaml_scenario_2.yml b/core/pkg/fixhandler/testdata/removals/tc-02-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/remove_scenarios/fixed_yaml_scenario_2.yml rename to core/pkg/fixhandler/testdata/removals/tc-02-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/remove_scenarios/original_yaml_scenario_3.yml b/core/pkg/fixhandler/testdata/removals/tc-03-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/remove_scenarios/original_yaml_scenario_3.yml rename to core/pkg/fixhandler/testdata/removals/tc-03-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/remove_scenarios/fixed_yaml_scenario_3.yml b/core/pkg/fixhandler/testdata/removals/tc-03-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/remove_scenarios/fixed_yaml_scenario_3.yml rename to core/pkg/fixhandler/testdata/removals/tc-03-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/remove_scenarios/original_yaml_scenario_4.yml b/core/pkg/fixhandler/testdata/removals/tc-04-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/remove_scenarios/original_yaml_scenario_4.yml rename to core/pkg/fixhandler/testdata/removals/tc-04-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/remove_scenarios/fixed_yaml_scenario_4.yml b/core/pkg/fixhandler/testdata/removals/tc-04-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/remove_scenarios/fixed_yaml_scenario_4.yml rename to core/pkg/fixhandler/testdata/removals/tc-04-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/replace_scenarios/original_yaml_scenario_1.yml b/core/pkg/fixhandler/testdata/replaces/tc-01-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/replace_scenarios/original_yaml_scenario_1.yml rename to core/pkg/fixhandler/testdata/replaces/tc-01-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/replace_scenarios/fixed_yaml_scenario_1.yml b/core/pkg/fixhandler/testdata/replaces/tc-01-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/replace_scenarios/fixed_yaml_scenario_1.yml rename to core/pkg/fixhandler/testdata/replaces/tc-01-01-expected.yaml diff --git a/core/pkg/fixhandler/testdata/replace_scenarios/original_yaml_scenario_2.yml b/core/pkg/fixhandler/testdata/replaces/tc-02-00-input.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/replace_scenarios/original_yaml_scenario_2.yml rename to core/pkg/fixhandler/testdata/replaces/tc-02-00-input.yaml diff --git a/core/pkg/fixhandler/testdata/replace_scenarios/fixed_yaml_scenario_2.yml b/core/pkg/fixhandler/testdata/replaces/tc-02-01-expected.yaml similarity index 100% rename from core/pkg/fixhandler/testdata/replace_scenarios/fixed_yaml_scenario_2.yml rename to core/pkg/fixhandler/testdata/replaces/tc-02-01-expected.yaml