Skip to content

Commit

Permalink
fix a few test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Calum Murray <[email protected]>
  • Loading branch information
Cali0707 committed Feb 1, 2024
1 parent 625d9f9 commit c93c143
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sql/v2/test/tck/subscriptions_api_recreations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,20 @@ tests:
source: "http://www.some-website.com"

- name: Disjunctive Normal Form (1)
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
expression: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
result: true
eventOverrides:
id: "myId"
type: "example.event.success"
- name: Disjunctive Normal Form (2)
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
expression: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
result: true
eventOverrides:
id: "notmyId"
type: "example.event.warning"
source: "http://localhost.localdomain"
- name: Disjunctive Normal Form (3)
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
expression: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
result: false
eventOverrides:
id: "notmyId"
Expand Down Expand Up @@ -150,7 +150,7 @@ tests:
source: "http://localhost.localdomain"
- name: Conjunctive Normal Form (4)
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
result: true
result: false
eventOverrides:
id: "myId"
type: "example.event.success"
Expand All @@ -160,7 +160,7 @@ tests:
error: missingAttribute
eventOverrides:
id: "myId"
type: "example.event.success"
type: "example.event.warning"
source: "http://localhost.localdomain"


Expand Down
3 changes: 3 additions & 0 deletions sql/v2/test/tck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ func (tc TckTestCase) ExpectedResult() interface{} {
return int32(tc.Result.(int))
case float64:
return int32(tc.Result.(float64))
case bool:
return tc.Result.(bool)
}
return tc.Result
}
Expand Down Expand Up @@ -126,6 +128,7 @@ func TestTCK(t *testing.T) {
t.Run(file.Name, func(t *testing.T) {
for j, testCase := range tckFiles[i].Tests {
j := j
testCase := testCase
t.Run(testCase.Name, func(t *testing.T) {
t.Parallel()
testCase := tckFiles[i].Tests[j]
Expand Down

0 comments on commit c93c143

Please sign in to comment.