summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2014-09-18 08:03:52 +0000
committerDavid Kranz <dkranz@redhat.com>2014-10-10 14:38:42 -0400
commitbd5df126f8ce8d53ecf81a9192064c76496658b2 (patch)
tree8e2f0142d1bec57350d6a57b9ac9834916fdbc3b
parent5f3d71ff27641885c8264fba8716a31cf3844bbf (diff)
downloadtempest-bd5df126f8ce8d53ecf81a9192064c76496658b2.tar.gz
Add a server console-log test with unlimited length
Now server console-log API is important for debugging gate problems and the API is called with unlimited length for debugging. However, there is not the API test with unlimited length. This patch adds the test. Change-Id: I5a35f086deddfcd54e995cb1156699592d1daea6
-rw-r--r--tempest/api/compute/servers/test_server_actions.py19
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 071bbfb8c..256ce0c91 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -372,6 +372,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