-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into robert/authz-expira…
…tion
- Loading branch information
Showing
38 changed files
with
1,226 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Feature: inserting, updating and saving entities | ||
|
||
Scenario: can't insert an entity with a duplicate primary key | ||
Given an existing entity | ||
""" | ||
{"name": "foo", "not_unique": "bar"} | ||
""" | ||
When I insert | ||
""" | ||
{"name": "foo", "not_unique": "baz"} | ||
""" | ||
Then expect a "already exists" error | ||
And expect grpc error code "ALREADY_EXISTS" | ||
|
||
Scenario: can't update entity that doesn't exist | ||
When I update | ||
""" | ||
{"name":"foo"} | ||
""" | ||
Then expect a "not found" error | ||
And expect grpc error code "NOT_FOUND" | ||
# | ||
Scenario: can't violate unique constraint on insert | ||
Given an existing entity | ||
""" | ||
{"name": "foo", "unique": "bar"} | ||
""" | ||
When I insert | ||
""" | ||
{"name": "baz", "unique": "bar"} | ||
""" | ||
Then expect a "unique key violation" error | ||
And expect grpc error code "FAILED_PRECONDITION" | ||
|
||
Scenario: can't violate unique constraint on update | ||
Given an existing entity | ||
""" | ||
{"name": "foo", "unique": "bar"} | ||
""" | ||
And an existing entity | ||
""" | ||
{"name": "baz", "unique": "bam"} | ||
""" | ||
When I update | ||
""" | ||
{"name": "baz", "unique": "bar"} | ||
""" | ||
Then expect a "unique key violation" error | ||
And expect grpc error code "FAILED_PRECONDITION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.