-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* MultiUse or multi_use Signed-off-by: Jason Sy <[email protected]> * didn't save some Signed-off-by: Jason Sy <[email protected]> * column rename migrations Signed-off-by: Jason Sy <[email protected]> * multi-use bdd test Signed-off-by: Jason Sy <[email protected]> * test Signed-off-by: Jason Sy <[email protected]> * lint fix Signed-off-by: Jason Sherman <[email protected]> * we need to not tox lint these files Signed-off-by: Jason Sy <[email protected]> Co-authored-by: usingtechnology <[email protected]> Co-authored-by: Jason Sherman <[email protected]>
- Loading branch information
1 parent
fc82073
commit e0fd1d5
Showing
9 changed files
with
102 additions
and
44 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
services/traction/api/db/migrations/versions/rename_reusable_to_multi_use_5f13cfb97471.py
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,23 @@ | ||
"""rename reusable to multi_use | ||
Revision ID: 5f13cfb97471 | ||
Revises: cd86ad6d3331 | ||
Create Date: 2022-07-21 18:27:12.052800 | ||
""" | ||
from alembic import op | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "5f13cfb97471" | ||
down_revision = "cd86ad6d3331" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.alter_column("connection_invitation", "reusable", new_column_name="multi_use") | ||
|
||
|
||
def downgrade(): | ||
op.alter_column("connection_invitation", "multi_use", new_column_name="reusable") |
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
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
16 changes: 16 additions & 0 deletions
16
services/traction/bdd-tests/features/v1-multi-use-invitation.feature
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,16 @@ | ||
Feature: multi-use-invitation | ||
Scenario: One invitation used multiple times | ||
Given we have authenticated at the innkeeper | ||
And we have "3" traction tenants | ||
| name | role | | ||
| alice | inviter | | ||
| faber | invitee1 | | ||
| bob | invitee2| | ||
And "alice" creates a multi-use invitation | ||
When "faber" receives the invitation from "alice" | ||
And "bob" receives the invitation from "alice" | ||
Then "faber" has a connection to "alice" in status "Active" | ||
And "bob" has a connection to "alice" in status "Active" | ||
And we sadly wait for 10 seconds because we have not figured out how to listen for events | ||
Then "alice" has a connection to "faber" in status "Active" | ||
And "alice" has a connection to "bob" in status "Active" |