Skip to content

Commit cf3711e

Browse files
hmmm
1 parent a720c31 commit cf3711e

File tree

5 files changed

+9
-41
lines changed

5 files changed

+9
-41
lines changed

examples/bls/extra/root/.ssh/authorized_keys

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.pytest.ini_options]
2-
addopts = "-sv"
2+
addopts = "--strict-markers -v"
33
asyncio_mode = "auto"
4+
pythonpath = "."
45
testpaths = ["test"]
5-
pythonpath = '.'

examples/test/identity

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/test/identity.pub

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/test/test_basic.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,19 @@
22

33
import os
44
from collections.abc import AsyncGenerator
5-
from pathlib import Path
65

76
import pytest
87

98
import testthing
109

1110

12-
pytest_plugins = ["pytest_asyncio"]
13-
14-
1511
@pytest.fixture
1612
async def machine() -> AsyncGenerator[testthing.VirtualMachine, None]:
1713
image = os.getenv("TEST_IMAGE")
1814
if not image:
1915
raise RuntimeError("TEST_IMAGE environment variable must be set")
20-
private = Path(__file__).parent / "identity"
21-
private.chmod(0o600) # ssh will ignore it otherwise
2216
with testthing.IpcDirectory() as ipc:
23-
async with testthing.VirtualMachine(
24-
image=image, ipc=ipc, identity=(private, None), verbose=True
25-
) as vm:
17+
async with testthing.VirtualMachine(image=image, ipc=ipc, verbose=True) as vm:
2618
yield vm
2719

2820

@@ -34,7 +26,12 @@ async def test_basic(machine: testthing.VirtualMachine) -> None:
3426
await m.execute("touch /a")
3527

3628
# the content of /sysroot is what we expect
37-
assert await m.execute("ls /sysroot") == "composefs\nlost+found\nstate\n"
29+
expected = set[str](("composefs", "state"))
30+
if os.getenv("FS_FORMAT", "") in ("ext4", ""):
31+
expected.add("lost+found")
32+
33+
output = await m.execute("ls /sysroot")
34+
assert set(output.splitlines()) == expected
3835

3936
# make sure /etc and /var persist across a reboot
4037
await m.write("/etc/persists.conf", "hihi conf")

0 commit comments

Comments
 (0)