-
Notifications
You must be signed in to change notification settings - Fork 918
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add integration test for signal handling warnings/errors
- Loading branch information
1 parent
d52950c
commit 8b81ceb
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pytest | ||
|
||
from tests.integration_tests.instances import IntegrationInstance | ||
from tests.integration_tests.util import verify_clean_boot | ||
|
||
USER_DATA = """\ | ||
#cloud-config | ||
runcmd: | ||
- reboot | ||
""" | ||
|
||
|
||
@pytest.mark.user_data(USER_DATA) | ||
def test_no_warnings(client: IntegrationInstance): | ||
"""Test that the signal handler does not log errors on reboot. | ||
Note that for single process boots, `Conflicts=shutdown.target` will | ||
prevent the shutdown from happening before the cloud-init process has | ||
exited. | ||
""" | ||
verify_clean_boot(client) |