Merge "Added some tests for environment." into stable/liberty

This commit is contained in:
Jenkins
2015-10-13 15:16:17 +00:00
committed by Gerrit Code Review

View File

@@ -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'