diff --git a/core/pkg/fixhandler/fixhandler_test.go b/core/pkg/fixhandler/fixhandler_test.go index a372451b..d598dd83 100644 --- a/core/pkg/fixhandler/fixhandler_test.go +++ b/core/pkg/fixhandler/fixhandler_test.go @@ -266,67 +266,3 @@ func Test_fixPathToValidYamlExpression(t *testing.T) { }) } } - -func Test_sanitizeYaml(t *testing.T) { - type args struct { - fileAsString string - } - tests := []struct { - name string - args args - want string - }{ - { - name: "sanitize yaml starting with ---", - args: args{ - fileAsString: "---\nlabel: test", - }, - want: "# ---\nlabel: test", - }, - { - name: "sanitize yaml not starting with ---", - args: args{ - fileAsString: "label: test", - }, - want: "label: test", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := sanitizeYaml(tt.args.fileAsString) - assert.Equal(t, tt.want, got) - }) - } -} - -func Test_revertSanitizeYaml(t *testing.T) { - type args struct { - fixedYamlString string - } - tests := []struct { - name string - args args - want string - }{ - { - name: "revert sanitized yaml starting with ---", - args: args{ - fixedYamlString: "# ---\nlabel: test", - }, - want: "---\nlabel: test", - }, - { - name: "revert sanitized yaml not starting with ---", - args: args{ - fixedYamlString: "label: test", - }, - want: "label: test", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := revertSanitizeYaml(tt.args.fixedYamlString) - assert.Equal(t, tt.want, got) - }) - } -}