aports/testing/oauth2-proxy/fix-options-test.patch
2025-03-19 11:33:05 +00:00

15 lines
987 B
Diff

Fix test case error message mismatch in `pkg/apis/options/load_test.go`.
`TestOptions` has the `TestOptionSubStruct` field, which is the parent of
`StringSliceOptions`.
---
--- a/pkg/apis/options/load_test.go
+++ b/pkg/apis/options/load_test.go
@@ -470,7 +470,7 @@
configFile: []byte(`stringSliceOption: "a"`),
input: &TestOptions{},
expectedOutput: &TestOptions{},
- expectedErr: errors.New("error unmarshalling config: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field TestOptions.StringSliceOption of type []string"),
+ expectedErr: errors.New("error unmarshalling config: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field TestOptions.TestOptionSubStruct.StringSliceOption of type []string"),
}),
Entry("with a config file containing environment variable references", loadYAMLTableInput{
configFile: []byte("stringOption: ${TESTUSER}"),