Skip to content

Commit

Permalink
test: add integration tests [run-int-tests]
Browse files Browse the repository at this point in the history
  • Loading branch information
ajasnosz committed Apr 18, 2024
1 parent e3945a2 commit 929a092
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions integration_tests/test_poller_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,11 @@ def setup_small_walk(request):
},
}
update_profiles(profile)
update_file([f"{trap_external_ip},,2c,public,,,20,walk1,f,"], "inventory2.yaml")
update_file([f"{trap_external_ip},,2c,public,,,1800,walk1,f,"], "inventory2.yaml")
upgrade_helm(["inventory2.yaml", "profiles.yaml"])
time.sleep(30)
yield
update_file([f"{trap_external_ip},,2c,public,,,20,walk1,f,t"], "inventory2.yaml")
update_file([f"{trap_external_ip},,2c,public,,,1800,walk1,f,t"], "inventory2.yaml")
upgrade_helm(["inventory2.yaml"])
time.sleep(20)

Expand Down Expand Up @@ -420,11 +420,11 @@ def setup_small_walk_with_full_walk_enabled(request):
},
}
update_profiles(profile)
update_file([f"{trap_external_ip},,2c,public,,,20,walk1,f,"], "inventory.yaml")
update_file([f"{trap_external_ip},,2c,public,,,2000,walk1,f,"], "inventory.yaml")
upgrade_helm(["inventory.yaml", "profiles.yaml"])
time.sleep(30)
yield
update_file([f"{trap_external_ip},,2c,public,,,20,walk1,f,t"], "inventory.yaml")
update_file([f"{trap_external_ip},,2c,public,,,2000,walk1,f,t"], "inventory.yaml")
upgrade_helm(["inventory.yaml"])
time.sleep(20)

Expand All @@ -434,15 +434,15 @@ class TestSmallWalkWithFullWalkEnabled:
def test_check_if_full_walk_is_done_with_profile_set(self, setup_splunk):
time.sleep(20)
search_string = (
"""| mpreview index=netmetrics earliest=-30s | search "TCP-MIB" """
"""| mpreview index=netmetrics earliest=-20s | search "TCP-MIB" """
)
result_count, metric_count = run_retried_single_search(
setup_splunk, search_string, 1
)
assert result_count > 0
assert metric_count > 0
search_string = (
"""| mpreview index=netmetrics earliest=-30s | search "IP-MIB" """
"""| mpreview index=netmetrics earliest=-20s | search "IP-MIB" """
)
result_count, metric_count = run_retried_single_search(
setup_splunk, search_string, 2
Expand All @@ -454,11 +454,11 @@ def test_check_if_full_walk_is_done_with_profile_set(self, setup_splunk):
@pytest.fixture
def setup_walk(request):
trap_external_ip = request.config.getoption("trap_external_ip")
update_file([f"{trap_external_ip},,2c,public,,,20,,f,"], "inventory2.yaml")
update_file([f"{trap_external_ip},,2c,public,,,1900,,f,"], "inventory2.yaml")
upgrade_helm(["inventory2.yaml", "profiles.yaml"])
time.sleep(30)
yield
update_file([f"{trap_external_ip},,2c,public,,,20,,f,t"], "inventory2.yaml")
update_file([f"{trap_external_ip},,2c,public,,,1900,,f,t"], "inventory2.yaml")
upgrade_helm(["inventory2.yaml"])
time.sleep(20)

Expand Down

0 comments on commit 929a092

Please sign in to comment.