From b9f375a8b979ce71b2b4bc248ee75432f26049f7 Mon Sep 17 00:00:00 2001 From: Pawel Szkamruk Date: Mon, 23 Oct 2023 14:24:53 +0200 Subject: [PATCH] working on splunk integration tests --- ui_tests/config/config.py | 4 ++-- ui_tests/tests/test_inventory_basic.py | 15 +++++++-------- ui_tests/tests/test_splunk_integration.py | 12 +++--------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/ui_tests/config/config.py b/ui_tests/config/config.py index d8b04e8a4..846b0fa19 100644 --- a/ui_tests/config/config.py +++ b/ui_tests/config/config.py @@ -13,12 +13,12 @@ def get_execution_type(): # EXECUTION_TYPE_LOCAL = "remote" EXECUTION_TYPE = get_execution_type() -# UI_URL = "http://10.202.2.199:30001/" +# UI_URL = "http://10.202.8.190:30001/" UI_URL = "http://localhost:30001/" EVENT_INDEX = "netops" LOGS_INDEX = "em_logs" -DEVICE_SIMULATOR_HOST = "10.202.1.48" +DEVICE_SIMULATOR_HOST = "10.202.5.70" # SIM_HOST = "10.202.5.170" # old not exists anymore diff --git a/ui_tests/tests/test_inventory_basic.py b/ui_tests/tests/test_inventory_basic.py index 396fd7a00..e30fec2a0 100644 --- a/ui_tests/tests/test_inventory_basic.py +++ b/ui_tests/tests/test_inventory_basic.py @@ -117,7 +117,7 @@ def test_add_group_into_inventory_entry(): is_on_list = p_groups.check_if_groups_is_on_list(group_name) assert is_on_list is False -@pytest.mark.current +#@pytest.mark.current def test_try_to_add_device_with_no_data_into_inventory(): """ Test that user is not able to add inventory entry with no data @@ -160,7 +160,7 @@ def test_try_to_add_device_with_no_data_into_inventory(): is_on_list = p_inventory.check_if_entry_is_on_list(host) assert is_on_list is False - +#@pytest.mark.current def test_setting_min_walk_interval_value_in_inventory(): """ Test that user able to set walk interval value @@ -197,7 +197,7 @@ def test_setting_min_walk_interval_value_in_inventory(): is_on_list = p_inventory.check_if_entry_is_on_list(host) assert is_on_list is False - +#@pytest.mark.current def test_setting_max_walk_interval_value_in_inventory(): """ Test that user able to set walk interval value @@ -233,7 +233,7 @@ def test_setting_max_walk_interval_value_in_inventory(): is_on_list = p_inventory.check_if_entry_is_on_list(host) assert is_on_list is False - +@pytest.mark.current def test_try_to_add_device_with_all_available_fields_into_inventory(): """ Test that user is not able to add inventory entry all available fields @@ -288,7 +288,7 @@ def test_try_to_add_device_with_all_available_fields_into_inventory(): p_profiles.delete_profile_from_list(profile_1) p_profiles.delete_profile_from_list(profile_2) - +@pytest.mark.current def test_edit_inventory_entry_with_all_available_fields(): """ Test that user is not able to add inventory entry all available fields @@ -304,8 +304,8 @@ def test_edit_inventory_entry_with_all_available_fields(): security_engine = "8000000903000AAAEF536715" walk_interval = "3600" smart_profiles = "false" - profile_1 = "profile_1" - profile_2 = "profile_2" + profile_1 = "profile_1_edit" + profile_2 = "profile_2_edit" p_header.switch_to_profiles() p_profiles.click_add_profile_button() @@ -343,7 +343,6 @@ def test_edit_inventory_entry_with_all_available_fields(): new_secret = "changed_secret" new_security_engine = "800000090BC0DD111101" new_walk_interval = "10000" - profile_2 = "profile_2" new_smart_profiles = "true" p_inventory.clik_edit_inventory_entry(host) diff --git a/ui_tests/tests/test_splunk_integration.py b/ui_tests/tests/test_splunk_integration.py index ad37de4be..4fec7c725 100644 --- a/ui_tests/tests/test_splunk_integration.py +++ b/ui_tests/tests/test_splunk_integration.py @@ -31,7 +31,7 @@ # p_profiles.clear_profiles() -# @pytest.mark.current +@pytest.mark.current def test_applying_changes_for_device_that_does_not_exists(setup): """ Configure device which does not exist @@ -119,7 +119,7 @@ def test_applying_changes_for_device_that_does_not_exists(setup): p_profiles.delete_profile_from_list(profile_name) -# @pytest.mark.current +@pytest.mark.current def test_setting_group_in_inventory(setup): """ Configure group with device, @@ -245,9 +245,8 @@ def test_setting_group_in_inventory(setup): p_profiles.delete_profile_from_list(profile_name) -# groupp deveices (add 2 devices, then remove one) - more basic test -# @pytest.mark.current +@pytest.mark.current def test_setting_host_in_inventory(setup): """ Configure device, enable smart profiles and two standard profiles, and one base profile @@ -452,8 +451,3 @@ def test_setting_host_in_inventory(setup): p_profiles.delete_profile_from_list(profile_2_name) p_profiles.delete_profile_from_list(base_profile_name) - # test add/remove device done - - # test profiles are being polled done - # add profile remove profile done - # switch smart profiles on -> off 1/2 done