From cf2f97d43bdb931ff72f9b44816a96d0ce9e312f Mon Sep 17 00:00:00 2001 From: axl89 Date: Mon, 22 Aug 2016 11:09:42 +0200 Subject: [PATCH] Revert "Fixing test framework" This reverts commit c97c8d08685eace6135afa8c1299c3815c5ad715. --- tests/console/ACL.py | 2 +- tests/console/Bulk_operations.py | 2 +- tests/console/Misc.py | 2 +- tests/console/Planned_downtime.py | 2 +- tests/console/Policies.py | 2 +- tests/console/Quiet_functionality.py | 2 +- tests/console/Users.py | 2 +- tests/console/icmp_test.py | 2 +- tests/console/include/policy_functions.py | 2 +- tests/run_console_tests.py | 3 --- 10 files changed, 9 insertions(+), 12 deletions(-) diff --git a/tests/console/ACL.py b/tests/console/ACL.py index e2cf784578..c2d14944f3 100644 --- a/tests/console/ACL.py +++ b/tests/console/ACL.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from include.common_classes_60 import PandoraWebDriverTestCase -from include.common_functions_60 import is_element_present, click_menu_element, detect_and_pass_all_wizards, gen_random_string, is_enterprise +from include.common_functions_60 import login, is_element_present, click_menu_element, detect_and_pass_all_wizards, logout, gen_random_string, is_enterprise from include.agent_functions import create_agent, search_agent, create_agent_group from include.user_functions import create_user, create_user_profile from include.module_functions import create_module diff --git a/tests/console/Bulk_operations.py b/tests/console/Bulk_operations.py index 639df441c1..3c4a3f52bd 100644 --- a/tests/console/Bulk_operations.py +++ b/tests/console/Bulk_operations.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from include.common_classes_60 import PandoraWebDriverTestCase -from include.common_functions_60 import click_menu_element, detect_and_pass_all_wizards +from include.common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards from include.agent_functions import create_agent from selenium import webdriver from selenium.webdriver.common.by import By diff --git a/tests/console/Misc.py b/tests/console/Misc.py index 7e1c96e21a..5ec6c30914 100644 --- a/tests/console/Misc.py +++ b/tests/console/Misc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from include.common_classes_60 import PandoraWebDriverTestCase -from include.common_functions_60 import click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, is_element_present +from include.common_functions_60 import login, click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, is_element_present, logout from include.reports_functions import create_report, delete_report from include.user_functions import create_user from include.agent_functions import create_agent diff --git a/tests/console/Planned_downtime.py b/tests/console/Planned_downtime.py index df2b47be88..07f063b503 100644 --- a/tests/console/Planned_downtime.py +++ b/tests/console/Planned_downtime.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from include.common_classes_60 import PandoraWebDriverTestCase -from include.common_functions_60 import click_menu_element, detect_and_pass_all_wizards, gen_random_string, refresh_N_times_until_find_element +from include.common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards, logout, gen_random_string, refresh_N_times_until_find_element from include.planned_downtime_functions import * from include.alert_functions import * from include.module_functions import * diff --git a/tests/console/Policies.py b/tests/console/Policies.py index 40d0f327ee..3fa32da873 100644 --- a/tests/console/Policies.py +++ b/tests/console/Policies.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from include.common_classes_60 import PandoraWebDriverTestCase -from include.common_functions_60 import detect_and_pass_all_wizards, gen_random_string, is_enterprise +from include.common_functions_60 import login, detect_and_pass_all_wizards, gen_random_string, is_enterprise from include.policy_functions import * from include.agent_functions import * from include.collection_functions import * diff --git a/tests/console/Quiet_functionality.py b/tests/console/Quiet_functionality.py index 5b58421c4c..aaf4b18b20 100644 --- a/tests/console/Quiet_functionality.py +++ b/tests/console/Quiet_functionality.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from include.common_classes_60 import PandoraWebDriverTestCase -from include.common_functions_60 import click_menu_element, detect_and_pass_all_wizards, gen_random_string +from include.common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards, logout, gen_random_string from include.planned_downtime_functions import * from include.alert_functions import * from include.module_functions import * diff --git a/tests/console/Users.py b/tests/console/Users.py index 61589b13c1..067da3bfdf 100644 --- a/tests/console/Users.py +++ b/tests/console/Users.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from include.common_classes_60 import PandoraWebDriverTestCase -from include.common_functions_60 import click_menu_element, detect_and_pass_all_wizards, activate_home_screen +from include.common_functions_60 import login, logout, click_menu_element, detect_and_pass_all_wizards, activate_home_screen from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys diff --git a/tests/console/icmp_test.py b/tests/console/icmp_test.py index d19d064691..a9c519277f 100644 --- a/tests/console/icmp_test.py +++ b/tests/console/icmp_test.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from include.common_classes_60 import PandoraWebDriverTestCase -from include.common_functions_60 import click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, gen_random_string +from include.common_functions_60 import login, click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, gen_random_string from include.agent_functions import create_agent from selenium import webdriver from selenium.webdriver.common.by import By diff --git a/tests/console/include/policy_functions.py b/tests/console/include/policy_functions.py index 8f244ee29d..7ec9a34280 100644 --- a/tests/console/include/policy_functions.py +++ b/tests/console/include/policy_functions.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from common_classes_60 import PandoraWebDriverTestCase -from common_functions_60 import click_menu_element, detect_and_pass_all_wizards +from common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards, logout from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys diff --git a/tests/run_console_tests.py b/tests/run_console_tests.py index f97da53725..0ffd1718e7 100755 --- a/tests/run_console_tests.py +++ b/tests/run_console_tests.py @@ -75,8 +75,6 @@ class TracingStreamResult(testtools.StreamResult): self.skipped.append('test_id') is_enterprise = '1' == getenv('ENTERPRISE', False) -num_threads = 0 - if is_enterprise: num_threads = 2 else: @@ -87,7 +85,6 @@ a = ArticaTestLoader() tests = a.discover(start_dir='console',pattern='*.py') print str(tests.countTestCases())+" tests found" -print "Using "+str(num_threads)+" threads" concurrent_suite = testtools.ConcurrentStreamTestSuite(lambda: (split_suite_into_chunks(num_threads, tests))) result = TracingStreamResult()