integration-tests: test_run() with --no-graphics (#757)

This commit is contained in:
Nikolay Edigaryev 2024-03-12 15:12:02 +04:00 committed by GitHub
parent 0602d6e0e1
commit e06d89f95d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -1,16 +1,18 @@
import uuid
import pytest
from paramiko.client import SSHClient, AutoAddPolicy
def test_run(tart):
@pytest.mark.parametrize("run_opts", [[], ["--no-graphics"]])
def test_run(tart, run_opts):
vm_name = f"integration-test-run-{uuid.uuid4()}"
# Instantiate a VM with admin:admin SSH access
tart.run(["clone", "ghcr.io/cirruslabs/macos-sonoma-base:latest", vm_name])
# Run the VM asynchronously
tart_run_process = tart.run_async(["run", vm_name])
tart_run_process = tart.run_async(["run", vm_name] + run_opts)
# Obtain the VM's IP
stdout, _ = tart.run(["ip", vm_name, "--wait", "120"])