diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-10-15 08:41:36 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-10-15 08:41:36 +0000 |
commit | 04ad4b0d1dde2fb39bc673348e31a4bc8f1250d6 (patch) | |
tree | 6ce1aa3578ee519fc46013577586503a8040ae81 | |
parent | 9b0aed330df3ae842ebaad0494988c7a336acfe3 (diff) | |
parent | bd5df126f8ce8d53ecf81a9192064c76496658b2 (diff) | |
download | tempest-04ad4b0d1dde2fb39bc673348e31a4bc8f1250d6.tar.gz |
Merge "Add a server console-log test with unlimited length"
-rw-r--r-- | tempest/api/compute/servers/test_server_actions.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py index 3aacf2aec..b51b46e4f 100644 --- a/tempest/api/compute/servers/test_server_actions.py +++ b/tempest/api/compute/servers/test_server_actions.py @@ -358,6 +358,25 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest): @testtools.skipUnless(CONF.compute_feature_enabled.console_output, 'Console output not supported.') @test.attr(type='gate') + def test_get_console_output_with_unlimited_size(self): + _, server = self.create_test_server(wait_until='ACTIVE') + + def _check_full_length_console_log(): + _, output = self.servers_client.get_console_output(server['id'], + None) + self.assertTrue(output, "Console output was empty.") + lines = len(output.split('\n')) + + # NOTE: This test tries to get full length console log, and the + # length should be bigger than the one of test_get_console_output. + self.assertTrue(lines > 10, "Cannot get enough console log length." + " (lines: %s)" % lines) + + self.wait_for(_check_full_length_console_log) + + @testtools.skipUnless(CONF.compute_feature_enabled.console_output, + 'Console output not supported.') + @test.attr(type='gate') def test_get_console_output_server_id_in_shutoff_status(self): # Positive test:Should be able to GET the console output # for a given server_id in SHUTOFF status |