Added some tests for environment.
Added some tests for environment-get, environment-update and environment-create. Change-Id: Ib027ebda4b6421f10eef297129bcf7c4e597191e
This commit is contained in:
parent
cddb8bf339
commit
1c959979af
@ -1118,6 +1118,12 @@ class NegativeCLITests(base_v2.MistralClientTestBase):
|
||||
self.mistral_admin,
|
||||
'environment-get')
|
||||
|
||||
def test_env_get_nonexistent(self):
|
||||
self.assertRaises(exceptions.CommandFailed,
|
||||
self.mistral_admin,
|
||||
'environment-get',
|
||||
params='nonexist')
|
||||
|
||||
def test_env_create_same_name(self):
|
||||
self.create_file('env.yaml',
|
||||
'name: env\n'
|
||||
@ -1130,6 +1136,12 @@ class NegativeCLITests(base_v2.MistralClientTestBase):
|
||||
self.environment_create,
|
||||
'env.yaml')
|
||||
|
||||
def test_env_create_empty(self):
|
||||
self.create_file('env.yaml')
|
||||
self.assertRaises(exceptions.CommandFailed,
|
||||
self.environment_create,
|
||||
'env.yaml')
|
||||
|
||||
def test_env_create_with_wrong_path_to_definition(self):
|
||||
self.assertRaises(exceptions.CommandFailed,
|
||||
self.mistral_admin,
|
||||
@ -1148,6 +1160,13 @@ class NegativeCLITests(base_v2.MistralClientTestBase):
|
||||
'environment-update',
|
||||
params='env')
|
||||
|
||||
def test_env_update_empty(self):
|
||||
self.create_file('env.yaml')
|
||||
self.assertRaises(exceptions.CommandFailed,
|
||||
self.mistral_admin,
|
||||
'environment-update',
|
||||
params='env')
|
||||
|
||||
def test_env_update_nonexistant_env(self):
|
||||
self.create_file('env.yaml',
|
||||
'name: env'
|
||||
|
Loading…
Reference in New Issue
Block a user