-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
67 additions
and
18 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
22 changes: 20 additions & 2 deletions
22
tests_new/integration_tests/core/environment/test_environment.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 |
---|---|---|
@@ -1,9 +1,27 @@ | ||
from assertpy import assert_that | ||
|
||
from integration_tests.core.environment.queries import update_environment, get_environment | ||
from integration_tests.errors import GqlError | ||
|
||
|
||
def test_create_env(session_env1): | ||
assert_that(session_env1.stack.status).is_equal_to('CREATE_COMPLETE') | ||
|
||
|
||
def test_create_env2(session_env2): | ||
assert_that(session_env2.stack.status).is_equal_to('CREATE_COMPLETE') | ||
def test_modify_env(client1, session_env1): | ||
test_description = 'a test description' | ||
env_uri = session_env1.environmentUri | ||
update_environment(client1, env_uri, {'description': test_description}) | ||
env = get_environment(client1, env_uri) | ||
assert_that(env.description).is_equal_to(test_description) | ||
|
||
|
||
def test_modify_env_unauthorized(client2, session_env1): | ||
test_description = 'unauthorized' | ||
env_uri = session_env1.environmentUri | ||
assert_that(update_environment).raises(GqlError).when_called_with( | ||
client2, env_uri, {'description': test_description} | ||
).contains( | ||
'UnauthorizedOperation', | ||
env_uri, | ||
) |
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,3 @@ | ||
class GqlError(RuntimeError): | ||
def __init__(self, msg): | ||
super().__init__(msg) |