Skip to content

Commit

Permalink
PR FIXUP - Fix CLI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Oct 2, 2023
1 parent 9ff60fb commit ffbef07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/cli/client_schema_add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestAddSchemaFromFile(t *testing.T) {

nodeLog := stopDefra()

jsonReponse := `{"data":{"collections":[{"name":"User","id":"bafkreib5hb7mr7ecbdufd7mvv6va6mpxukjai7hpnqkhxonnw7lzwfqlja","version_id":"bafkreib5hb7mr7ecbdufd7mvv6va6mpxukjai7hpnqkhxonnw7lzwfqlja"}],"result":"success"}}`
jsonReponse := `{"data":{"collections":[{"name":"User","id":"bafkreifxwnqwcg3uqqr3iydebnmeadmjxg722qauocdtjbusinjtzja7py","version_id":"bafkreifxwnqwcg3uqqr3iydebnmeadmjxg722qauocdtjbusinjtzja7py"}],"result":"success"}}`
assert.Contains(t, stdout, jsonReponse)
assertNotContainsSubstring(t, nodeLog, "ERROR")
}
Expand All @@ -47,7 +47,7 @@ func TestAddSchemaWithDuplicateType(t *testing.T) {

_ = stopDefra()

jsonReponse := `{"data":{"collections":[{"name":"Post","id":"bafkreicgpbla5wlogpinnm32arcqzptusdc5tzdznipqrf6nkroav6b25a","version_id":"bafkreicgpbla5wlogpinnm32arcqzptusdc5tzdznipqrf6nkroav6b25a"}],"result":"success"}}`
jsonReponse := `{"data":{"collections":[{"name":"Post","id":"bafkreibamgkyo3juvgx2b3ice4tjldcuxiibwo32kq22vfuyvzzgg7kfga","version_id":"bafkreibamgkyo3juvgx2b3ice4tjldcuxiibwo32kq22vfuyvzzgg7kfga"}],"result":"success"}}`
assertContainsSubstring(t, stdout1, jsonReponse)
assertContainsSubstring(t, stdout2, `schema type already exists. Name: Post`)
}

0 comments on commit ffbef07

Please sign in to comment.