diff options
Diffstat (limited to 'tests/report_tests/timeout_tests.py')
-rw-r--r-- | tests/report_tests/timeout_tests.py | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/report_tests/timeout_tests.py b/tests/report_tests/timeout_tests.py index 58678644..ffce9231 100644 --- a/tests/report_tests/timeout_tests.py +++ b/tests/report_tests/timeout_tests.py @@ -18,6 +18,10 @@ class PluginTimeoutTest(StageTwoReportTest): install_plugins = ['timeout_test'] sos_cmd = '-o timeout_test -vvv --plugin-timeout=10' + def test_correct_plugin_timeout(self): + man = self.get_plugin_manifest('timeout_test') + self.assertEquals(man['timeout'], 10) + def test_plugin_timed_out(self): self.assertSosLogNotContains('collected plugin \'timeout_test\' in') self.assertSosUILogContains('Plugin timeout_test timed out') @@ -33,7 +37,13 @@ class NativeCmdTimeoutTest(StageTwoReportTest): """ install_plugins = ['timeout_test'] - sos_cmd = '-o timeout_test -vvv' + sos_cmd = '-o timeout_test,host -vvv' + + def test_correct_plugin_timeout(self): + man = self.get_plugin_manifest('timeout_test') + self.assertEquals(man['timeout'], 100) + hman = self.get_plugin_manifest('host') + self.assertEquals(hman['timeout'], 300) def test_plugin_completed(self): self.assertSosLogContains('collected plugin \'timeout_test\' in') @@ -42,3 +52,18 @@ class NativeCmdTimeoutTest(StageTwoReportTest): def test_command_timed_out(self): self.assertSosLogContains(r"\[plugin:timeout_test\] command 'sleep 30' timed out after 10s") self.assertFileCollected('sos_commands/timeout_test/sleep_30') + +class MultipleTimeoutValues(NativeCmdTimeoutTest): + """Test that our plugin timeout option priority is functioning correctly + + :avocado: tags=stagetwo + """ + + install_plugins = ['timeout_test'] + sos_cmd = '-o timeout_test,host --plugin-timeout=30 -k timeout_test.timeout=60' + + def test_correct_plugin_timeout(self): + man = self.get_plugin_manifest('timeout_test') + self.assertEquals(man['timeout'], 60) + hman = self.get_plugin_manifest('host') + self.assertEquals(hman['timeout'], 30) |