Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrandon1 committed Jul 26, 2024
1 parent 84549e1 commit 7b33a71
Show file tree
Hide file tree
Showing 3 changed files with 128,604 additions and 359 deletions.
32 changes: 13 additions & 19 deletions pkg/claim/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,18 @@ var testCases = map[string]*testCase{
expectedStartTime: "1970-01-01T10:05:08+01:00",
expectedEndTime: "1970-01-01T10:05:08+01:00",
},
// "claim-invalid-additional-property": {
// expectedMarshallJSONError: true,
// },
// "claim-invalid-bool-results": {
// expectedMarshallJSONError: true,
// },
// // A little confusing; since we remap the "results" field, this interface{} value is not actually checked.
// // This is a limitation of the JSON Schema go client generator, and is perfectly fine for this context.
// "claim-invalid-non-result-result": {
// expectedMarshallJSONError: false,
// },
// "invalid-json": {
// expectedMarshallJSONError: true,
// },
// "missing-claim": {
// expectedMarshallJSONError: true,
// },
"claim-invalid-additional-property": {
expectedMarshallJSONError: true,
},
"claim-invalid-bool-results": {
expectedMarshallJSONError: true,
},
"invalid-json": {
expectedMarshallJSONError: true,
},
"missing-claim": {
expectedMarshallJSONError: true,
},
}

func getTestFile(testCaseName string) string {
Expand All @@ -75,8 +70,7 @@ func TestRoot_MarshalJSON(t *testing.T) {
root := &Root{}
err = json.Unmarshal(contents, root)
fmt.Println(testCaseName)
assert.Nil(t, err)
// assert.Equal(t, testCaseDefinition.expectedMarshallJSONError, err != nil)
assert.Equal(t, testCaseDefinition.expectedMarshallJSONError, err != nil)

if testCaseDefinition.expectedMarshallJSONError == false {
// start time assertion
Expand Down
188 changes: 0 additions & 188 deletions pkg/claim/testdata/claim-invalid-non-result-result.json

This file was deleted.

Loading

0 comments on commit 7b33a71

Please sign in to comment.