generated from coulomb/repo-seed
feat: snapshot/restore checkpoints (SAND-WP-0007)
Add workspace checkpoint API with SnapshotStore, extension hooks on compose-ssh and saas-stub, manager orchestration, CLI/HTTP surface, profile.compose-checkpoint, and docs/tests.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
"""Extension SDK base class tests."""
|
||||
|
||||
import pytest
|
||||
|
||||
from sandboxer.extensions.base import SandboxExtension
|
||||
from sandboxer.extensions.compose_ssh import ComposeSSHExtension
|
||||
from sandboxer.extensions.vm_packer import VMPackerExtension
|
||||
@@ -13,4 +15,21 @@ def test_reference_extensions_subclass_base() -> None:
|
||||
def test_new_sandbox_id_from_inputs() -> None:
|
||||
assert SandboxExtension.new_sandbox_id({"sandbox_id": "fixed123"}) == "fixed123"
|
||||
generated = SandboxExtension.new_sandbox_id({})
|
||||
assert len(generated) == 8
|
||||
assert len(generated) == 8
|
||||
|
||||
|
||||
def test_default_snapshot_not_supported() -> None:
|
||||
class MinimalExtension(SandboxExtension):
|
||||
def provision(self, profile, inputs, host):
|
||||
return {}
|
||||
|
||||
def wait_ready(self, handle):
|
||||
return {}
|
||||
|
||||
def teardown(self, handle):
|
||||
return {}
|
||||
|
||||
ext = MinimalExtension()
|
||||
assert ext.supports_snapshots() is False
|
||||
with pytest.raises(NotImplementedError):
|
||||
ext.snapshot({})
|
||||
Reference in New Issue
Block a user