Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_cloudinit_datasource per Aliyun latest status #420

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions os_tests/tests/test_cloud_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,18 +1036,23 @@ def test_cloudinit_datasource(self):
self.skipTest('skip run as no such provider in datasource list')
for provider,name in datasource.items():
if self.vm.provider == provider:
utils_lib.run_cmd(self,
if provider == 'ali':
utils_lib.run_cmd(self,
'cat /run/cloud-init/cloud.cfg',
expect_ret=0,
expect_kw='{}, None'.format(name),
expect_kw='{}'.format(name),
msg='check if the datasource is correct')
if provider == 'ali':
utils_lib.run_cmd(self,
'cat /run/cloud-init/ds-identify.log | grep datasource',
expect_ret=0,
expect_kw="single entry in datasource_list \({}\) use that.".format(name),
msg='check if found the datasource')
else:
utils_lib.run_cmd(self,
'cat /run/cloud-init/cloud.cfg',
expect_ret=0,
expect_kw='{}, None'.format(name),
msg='check if the datasource is correct')
utils_lib.run_cmd(self,
'cat /run/cloud-init/ds-identify.log | grep datasource',
expect_ret=0,
Expand Down
Loading