Merge "Addresses pep8/pyflakes issues with compute admin tests"
This commit is contained in:
commit
dbdd275c00
@ -13,4 +13,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from cloudcafe.compute.common.types import BackupTypes
|
||||
from test_repo.compute.fixtures import ComputeAdminFixture
|
||||
|
||||
|
@ -54,4 +54,3 @@ class LockServerTests(ComputeAdminFixture):
|
||||
def test_cannot_resize_locked_server(self):
|
||||
with self.assertRaises(ActionInProgress):
|
||||
self.servers_client.resize(self.server.id, self.flavor_ref)
|
||||
|
||||
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||
from cloudcafe.compute.common.types import NovaServerStatusTypes
|
||||
from test_repo.compute.fixtures import ComputeAdminFixture
|
||||
|
||||
|
||||
class MigrateServerTests(ComputeAdminFixture):
|
||||
|
||||
@classmethod
|
||||
|
@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from test_repo.compute.fixtures import ComputeAdminFixture
|
||||
|
||||
|
||||
@ -28,6 +27,8 @@ class PauseServerTests(ComputeAdminFixture):
|
||||
|
||||
def test_pause_unpause_server(self):
|
||||
self.admin_servers_client.pause_server(self.server.id)
|
||||
self.admin_server_behaviors.wait_for_server_status(self.server.id, 'PAUSED')
|
||||
self.admin_server_behaviors.wait_for_server_status(
|
||||
self.server.id, 'PAUSED')
|
||||
self.admin_servers_client.unpause_server(self.server.id)
|
||||
self.admin_server_behaviors.wait_for_server_status(self.server.id, 'ACTIVE')
|
||||
self.admin_server_behaviors.wait_for_server_status(
|
||||
self.server.id, 'ACTIVE')
|
||||
|
@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from test_repo.compute.fixtures import ComputeAdminFixture
|
||||
|
||||
|
||||
class ResetServerStateTests(ComputeAdminFixture):
|
||||
|
||||
@classmethod
|
||||
@ -29,10 +29,12 @@ class ResetServerStateTests(ComputeAdminFixture):
|
||||
|
||||
# Set the active server into error status
|
||||
self.admin_servers_client.reset_state(self.server.id, 'error')
|
||||
current_server = self.admin_servers_client.get_server(self.server.id).entity
|
||||
current_server = self.admin_servers_client.get_server(
|
||||
self.server.id).entity
|
||||
self.assertEqual(current_server.status.lower(), 'error')
|
||||
|
||||
# Reset the server's error status back to active
|
||||
self.admin_servers_client.reset_state(self.server.id, 'active')
|
||||
current_server = self.admin_servers_client.get_server(self.server.id).entity
|
||||
current_server = self.admin_servers_client.get_server(
|
||||
self.server.id).entity
|
||||
self.assertEqual(current_server.status.lower(), 'active')
|
||||
|
@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from test_repo.compute.fixtures import ComputeAdminFixture
|
||||
|
||||
|
||||
class StopServerTests(ComputeAdminFixture):
|
||||
|
||||
@classmethod
|
||||
|
@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from test_repo.compute.fixtures import ComputeAdminFixture
|
||||
|
||||
|
||||
class SuspendServerTests(ComputeAdminFixture):
|
||||
|
||||
@classmethod
|
||||
|
@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
from random import randint
|
||||
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from cloudcafe.common.tools.datagen import rand_name
|
||||
from cloudcafe.compute.common.exceptions import ActionInProgress
|
||||
|
@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
from random import randint
|
||||
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from cloudcafe.common.tools.datagen import rand_name
|
||||
from cloudcafe.compute.common.exceptions import BadRequest, ItemNotFound
|
||||
|
Loading…
x
Reference in New Issue
Block a user