Merge "Use sudo when gather compute id information"

This commit is contained in:
Zuul 2024-06-12 01:59:26 +00:00 committed by Gerrit Code Review
commit 4ebe8fb23a

View File

@ -43,7 +43,9 @@ class TestStableCpuId(base.BaseWhiteboxComputeTest):
for hypervisor in hypervisors: for hypervisor in hypervisors:
name = hypervisor['hypervisor_hostname'] name = hypervisor['hypervisor_hostname']
ssh_client = clients.SSHClient(name) ssh_client = clients.SSHClient(name)
uuid_on_disk = ssh_client.execute(f'cat {compute_id_path}') uuid_on_disk = ssh_client.execute(f'cat {compute_id_path}',
sudo=True)
uuid_on_disk = uuid_on_disk.rstrip()
self.assertEqual( self.assertEqual(
hypervisor['id'], hypervisor['id'],
uuid_on_disk, uuid_on_disk,