Skip to content

Commit

Permalink
Merge pull request #897 from ernestio/model-changes
Browse files Browse the repository at this point in the history
Model changes
  • Loading branch information
g3kk0 authored Apr 20, 2018
2 parents 22d1bb7 + d6ca5df commit a24331b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions internal/features/cli/roles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ Feature: Ernest role management
When I run ernest with "role set --role reader --user ci_admin --project fakeaws --environment destroyable"
Then The output should contain "User 'ci_admin' has been authorized to read resource fakeaws/destroyable"
And I run ernest with "env info fakeaws destroyable"
Then The output should contain "usr (env owner)"
And The output should contain "ci_admin (env reader)"
Then The output should contain "usr (owner)"
And The output should contain "ci_admin (reader)"
And I run ernest with "role unset --role reader --user ci_admin --project fakeaws"
When I run ernest with "role unset --role reader --user ci_admin --project fakeaws --environment destroyable"
Then The output should contain "User 'ci_admin' has been unauthorized as fakeaws/destroyable reader"
And I run ernest with "env info fakeaws destroyable"
Then The output should contain "usr (env owner)"
And The output should not contain "ci_admin (env reader)"
Then The output should contain "usr (owner)"
And The output should not contain "ci_admin (reader)"

Scenario: Plain user role inheritance
Given I setup ernest with target "https://ernest.local"
Expand All @@ -55,27 +55,27 @@ Feature: Ernest role management
And I run ernest with "role unset --role reader --user role_user --project fakeaws --environment destroyable"
And I apply the definition "destroyable.yml"
When I run ernest with "env info fakeaws destroyable"
Then The output should contain "usr (env owner)"
Then The output should contain "usr (owner)"
And The output should not contain "role_user (reader)"
When I'm logged in as "role_user" / "secret123"
And I run ernest with "env list"
And The output should not contain "destroyable"
And I'm logged in as "usr" / "secret123"
When I run ernest with "role set --role owner --user role_user --project fakeaws"
And I run ernest with "env info fakeaws destroyable"
Then The output should contain "usr (env owner)"
And The output should contain "role_user (project owner)"
Then The output should contain "usr (owner)"
And The output should contain "role_user (owner)"
When I'm logged in as "role_user" / "secret123"
And I run ernest with "env list"
And The output should contain "destroyable"
And I'm logged in as "usr" / "secret123"
When I run ernest with "role set --role reader --user role_user --project fakeaws --environment destroyable"
And I run ernest with "env info fakeaws destroyable"
Then The output should contain "usr (env owner)"
And The output should contain "role_user (env reader)"
Then The output should contain "usr (owner)"
And The output should contain "role_user (reader)"
When I'm logged in as "role_user" / "secret123"
And I run ernest with "env info fakeaws destroyable"
Then The output should contain "role_user (env reader)"
Then The output should contain "role_user (reader)"
When I run ernest with "env destroy --yes fakeaws destroyable"
Then The output should contain "You don't have permissions to perform this action, please login as a resource owner"
When I'm logged in as "role_user" / "secret123"
Expand Down

0 comments on commit a24331b

Please sign in to comment.