Skip to content
Closed
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
29 changes: 29 additions & 0 deletions tests/integration/core/sandbox/test_extra_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,35 @@ async def test_creates_sandbox_with_nvme_enabled(self):
finally:
await SandboxInstance.delete(name)

async def test_creates_sandbox_with_nfs_enabled(self):
"""Test creating a sandbox with nfs extra arg.

Skips gracefully if the controlplane hasn't deployed nfs support yet.
"""
name = unique_name("extra-args-nfs")
created = False
try:
await SandboxInstance.create(
{
"name": name,
"image": default_image,
"extra_args": {"nfs": "enabled"},
"labels": default_labels,
}
)
created = True

retrieved = await SandboxInstance.get(name)
assert retrieved.spec.runtime.extra_args is not None
assert retrieved.spec.runtime.extra_args["nfs"] == "enabled"
except Exception as e:
if 'unsupported extraArgs key "nfs"' in str(e):
pytest.skip("controlplane hasn't deployed nfs support yet")
raise
finally:
if created:
await SandboxInstance.delete(name)

async def test_creates_sandbox_with_both_iptables_and_nvme(self):
"""Test creating a sandbox with both iptables and nvme enabled."""
name = unique_name("extra-args-both")
Expand Down
Loading