From af6dcdb130380fb85c70a8bec65d9b06c4777079 Mon Sep 17 00:00:00 2001 From: cdrappier Date: Wed, 10 Jun 2026 20:12:01 +0000 Subject: [PATCH 1/3] test(sandbox): add NFS kernel extraArgs integration test Add test case for creating a sandbox with nfs=enabled extraArgs, matching the new kernel variant added in controlplane PR #4348. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../core/sandbox/test_extra_args.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/integration/core/sandbox/test_extra_args.py b/tests/integration/core/sandbox/test_extra_args.py index 629a50e..6f4edf3 100644 --- a/tests/integration/core/sandbox/test_extra_args.py +++ b/tests/integration/core/sandbox/test_extra_args.py @@ -52,6 +52,25 @@ 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.""" + name = unique_name("extra-args-nfs") + await SandboxInstance.create( + { + "name": name, + "image": default_image, + "extra_args": {"nfs": "enabled"}, + "labels": default_labels, + } + ) + + try: + retrieved = await SandboxInstance.get(name) + assert retrieved.spec.runtime.extra_args is not None + assert retrieved.spec.runtime.extra_args["nfs"] == "enabled" + finally: + 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") From 60af0bb85dbbb01917da894371c8007ee260440d Mon Sep 17 00:00:00 2001 From: cdrappier Date: Wed, 10 Jun 2026 20:18:25 +0000 Subject: [PATCH 2/3] fix(test): skip nfs test when controlplane hasn't deployed nfs support yet The test gracefully skips if the API returns 'unsupported extraArgs key nfs', and will automatically start passing once controlplane PR #4348 is deployed. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../core/sandbox/test_extra_args.py | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/integration/core/sandbox/test_extra_args.py b/tests/integration/core/sandbox/test_extra_args.py index 6f4edf3..0c02744 100644 --- a/tests/integration/core/sandbox/test_extra_args.py +++ b/tests/integration/core/sandbox/test_extra_args.py @@ -53,16 +53,24 @@ async def test_creates_sandbox_with_nvme_enabled(self): await SandboxInstance.delete(name) async def test_creates_sandbox_with_nfs_enabled(self): - """Test creating a sandbox with nfs extra arg.""" + """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") - await SandboxInstance.create( - { - "name": name, - "image": default_image, - "extra_args": {"nfs": "enabled"}, - "labels": default_labels, - } - ) + try: + await SandboxInstance.create( + { + "name": name, + "image": default_image, + "extra_args": {"nfs": "enabled"}, + "labels": default_labels, + } + ) + except Exception as e: + if 'unsupported extraArgs key "nfs"' in str(e): + pytest.skip("controlplane hasn't deployed nfs support yet") + raise try: retrieved = await SandboxInstance.get(name) From 650d3e57c5a203cf1a510ad8d9441f57b730e770 Mon Sep 17 00:00:00 2001 From: cdrappier Date: Wed, 10 Jun 2026 20:29:20 +0000 Subject: [PATCH 3/3] fix(test): prevent resource leak in nfs test Wrap entire post-create flow in try/finally with a 'created' flag so the sandbox is always cleaned up even if get/assertions fail. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/integration/core/sandbox/test_extra_args.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/integration/core/sandbox/test_extra_args.py b/tests/integration/core/sandbox/test_extra_args.py index 0c02744..3158168 100644 --- a/tests/integration/core/sandbox/test_extra_args.py +++ b/tests/integration/core/sandbox/test_extra_args.py @@ -58,6 +58,7 @@ async def test_creates_sandbox_with_nfs_enabled(self): Skips gracefully if the controlplane hasn't deployed nfs support yet. """ name = unique_name("extra-args-nfs") + created = False try: await SandboxInstance.create( { @@ -67,17 +68,18 @@ async def test_creates_sandbox_with_nfs_enabled(self): "labels": default_labels, } ) - except Exception as e: - if 'unsupported extraArgs key "nfs"' in str(e): - pytest.skip("controlplane hasn't deployed nfs support yet") - raise + created = True - try: 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: - await SandboxInstance.delete(name) + 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."""