test_vars_deployment: fix race condition with multiple VMs on error case

This commit is contained in:
lassulus
2024-12-04 17:01:25 +01:00
parent acb78d4fb8
commit 8b12578c13

View File

@@ -104,6 +104,9 @@ def test_vm_deployment(
vm2 = stack.enter_context(spawn_vm(vm2_config, stdin=subprocess.DEVNULL))
qga_m1 = stack.enter_context(vm1.qga_connect())
qga_m2 = stack.enter_context(vm2.qga_connect())
# run these always succesfull commands to make sure all vms have started before continuing
qga_m1.run(["echo"])
qga_m2.run(["echo"])
# check my_secret is deployed
result = qga_m1.run(["cat", "/run/secrets/vars/m1_generator/my_secret"])
assert result.stdout == "hello\n"