Split test_rebuild() into two tests

The method tests rebuilds with and without passwords, but the tests are
independent and should be in two seperate tests.

Also, remove duplication of the rebuild with password test from
test_rebuild_preserve_ephemeral

Change-Id: I40d0376fabf319dbe703d593de8fb4cdcf0aeab1
This commit is contained in:
Johannes Erdfelt 2014-04-04 10:57:40 -07:00
parent 2005e17bed
commit 9162a5fe8f
1 changed files with 1 additions and 10 deletions

View File

@ -748,6 +748,7 @@ class ShellTest(utils.TestCase):
self.assert_called('GET', '/flavors/1', pos=-2)
self.assert_called('GET', '/images/2')
def test_rebuild_password(self):
self.run_command('rebuild sample-server 1 --rebuild-password asdf')
self.assert_called('GET', '/servers', pos=-8)
self.assert_called('GET', '/servers/1234', pos=-7)
@ -769,16 +770,6 @@ class ShellTest(utils.TestCase):
self.assert_called('GET', '/flavors/1', pos=-2)
self.assert_called('GET', '/images/2')
self.run_command('rebuild sample-server 1 --rebuild-password asdf')
self.assert_called('GET', '/servers', pos=-8)
self.assert_called('GET', '/servers/1234', pos=-7)
self.assert_called('GET', '/images/1', pos=-6)
self.assert_called('POST', '/servers/1234/action',
{'rebuild': {'imageRef': 1, 'adminPass': 'asdf'}},
pos=-5)
self.assert_called('GET', '/flavors/1', pos=-2)
self.assert_called('GET', '/images/2')
def test_start(self):
self.run_command('start sample-server')
self.assert_called('POST', '/servers/1234/action', {'os-start': None})