Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following test was failing about 2% of the test runs.
Can't have two entities with same alias/auth-path
Multiple entities can't have the same entity alias. If an alias gets assigned to an entity, and then to a second entity, it gets removed from the first. (Which is why alias's should be unique across a single auth method.)
That was the problem with this test failure; there were multiple entities with the same entity alias, ("[email protected]").
The error would occur when the alias got taken away by the second entity in the middle of the test of the first.
The fix was simply to change the "initial_user_email" config parameter to "[email protected]"
In addition, to debug the problem, I had to decode the jwt_authorized token. I decided to leave it decoded, as a class variable in test_helper.rb, and recompute it each start up. (It seems clearer that way.)
Fixed incompletely specified aliases
In debugging this problem, I also noticed a different, related problem. I was only using the alias name to specify the alias, but multiple aliases can have the same name if they have different auth paths.
I have fixed this so that alias access now requires both the name and auth-path
Ticket
PR fixes this ticket: #73