Skip to content

Commit

Permalink
working on splunk integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pszkamruk-splunk committed Oct 23, 2023
1 parent 71defea commit b9f375a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
4 changes: 2 additions & 2 deletions ui_tests/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
15 changes: 7 additions & 8 deletions ui_tests/tests/test_inventory_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 3 additions & 9 deletions ui_tests/tests/test_splunk_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit b9f375a

Please sign in to comment.