Skip to content

Commit

Permalink
Automation helper: Avoid integration test failures in CRE
Browse files Browse the repository at this point in the history
```
AssertionError: FAILURE: Crash report detected! MKAutomationException:
Error running automation call <tt>restart</tt>, output: <pre>Error
precompiling checks for host aut-helper-test-host: Failed to lookup IPv4 address
of aut-helper-test-host via DNS: [Errno -2] Name or service not known
(["Cannot lookup IP address of 'aut-helper-test-host' (Failed to lookup IPv4
address of aut-helper-test-host via DNS: [Errno -2] Name or service not known).
The host will not be monitored correctly."],)
```

Change-Id: I69f9c465dbca808fba3f6a435bdab3c6396c70eb
(cherry picked from commit d3f6321)
  • Loading branch information
jherbel committed Jan 16, 2025
1 parent fed7bfa commit 886ad10
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def test_config_reloading_with_reloader(site: Site) -> None:
def test_standard_workflow_involving_automations(site: Site) -> None:
hostname = "aut-helper-test-host"
try:
site.openapi.hosts.create(hostname)
site.openapi.hosts.create(
hostname,
attributes={"ipaddress": "127.0.0.1"},
)
site.activate_changes_and_wait_for_core_reload()
show_host_response = site.openapi.get(f"objects/host/{hostname}")
show_host_response.raise_for_status()
Expand Down

0 comments on commit 886ad10

Please sign in to comment.