-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cloud init tests for alibaba images.
- Loading branch information
1 parent
de217a0
commit 203bd1e
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
usr/share/lib/img_proof/tests/SLES/Alibaba/test_sles_alibaba.yaml
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,2 @@ | ||
tests: | ||
- test_sles_alibaba_services |
18 changes: 18 additions & 0 deletions
18
usr/share/lib/img_proof/tests/SLES/Alibaba/test_sles_alibaba_services.py
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,18 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.parametrize('name', [ | ||
('cloud-init-local'), | ||
('cloud-init'), | ||
('cloud-config'), | ||
('cloud-final') | ||
]) | ||
def test_sles_alibaba_one_shot_services(check_service, host, name): | ||
assert check_service(name, running=None) | ||
|
||
if host.exists('systemctl'): | ||
# No clear way to check a service exited successfully using sysvinit | ||
output = host.run( | ||
"systemctl show -p Result {0} | sed 's/Result=//g'".format(name) | ||
) | ||
assert output.stdout.strip() == 'success' |