Skip to content

Commit b923856

Browse files
fix(e2e): update stack_e2e tests for Wave 6 API changes
- Add image_policy field to all OrchestrationConfig constructors - Import ImagePolicy into test scope - Fix volume checkpoint test YAML to include top-level volumes section - Remove references to non-existent create_sparse_disk and ensure_volume E2E results: runtime 11/11, stack 7/8 (volume checkpoint test needs VirtioFS mount infra) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cc53728 commit b923856

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

crates/vz-stack/tests/stack_e2e.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ use vz_runtime_contract::{
2626
SandboxBackend, SandboxSpec, SandboxState,
2727
};
2828
use vz_stack::{
29-
Action, ContainerRuntime, OrchestrationConfig, StackError, StackEvent, StackExecutor,
30-
StackOrchestrator, StateStore, apply, parse_compose,
29+
Action, ContainerRuntime, ImagePolicy, OrchestrationConfig, StackError, StackEvent,
30+
StackExecutor, StackOrchestrator, StateStore, apply, parse_compose,
3131
};
3232

3333
fn has_virtualization_entitlement() -> bool {
@@ -701,6 +701,7 @@ services:
701701
let orch_config = OrchestrationConfig {
702702
poll_interval: Some(2),
703703
max_rounds: 30,
704+
image_policy: ImagePolicy::AllowAll,
704705
};
705706
let mut orchestrator = StackOrchestrator::new(executor, reconcile_store, orch_config);
706707

@@ -834,6 +835,7 @@ services:
834835
let orch_config = OrchestrationConfig {
835836
poll_interval: Some(2),
836837
max_rounds: 20,
838+
image_policy: ImagePolicy::AllowAll,
837839
};
838840
let mut orchestrator = StackOrchestrator::new(executor, reconcile_store, orch_config);
839841
let result = orchestrator.run(&spec, None).unwrap();
@@ -995,6 +997,7 @@ services:
995997
let orch_config = OrchestrationConfig {
996998
poll_interval: Some(2),
997999
max_rounds: 20,
1000+
image_policy: ImagePolicy::AllowAll,
9981001
};
9991002
let mut orchestrator = StackOrchestrator::new(executor, reconcile_store, orch_config);
10001003

@@ -1124,6 +1127,7 @@ services:
11241127
let orch_config = OrchestrationConfig {
11251128
poll_interval: Some(2),
11261129
max_rounds: 30,
1130+
image_policy: ImagePolicy::AllowAll,
11271131
};
11281132
let mut orchestrator = StackOrchestrator::new(executor, reconcile_store, orch_config);
11291133
let result = orchestrator.run(&spec, None).unwrap();
@@ -1325,6 +1329,8 @@ services:
13251329
command: ["sh", "-c", "while true; do sleep 1; done"]
13261330
volumes:
13271331
- journey-data:/journey
1332+
volumes:
1333+
journey-data:
13281334
"#;
13291335

13301336
let home = std::env::var("HOME").unwrap();
@@ -1341,19 +1347,14 @@ services:
13411347
let reconcile_store = StateStore::open(&db_path).unwrap();
13421348
let executor = StackExecutor::new(bridge, exec_store, tmp.path());
13431349

1344-
// Create the persistent volume
1345-
let data_img = tmp.path().join("data.img");
1346-
create_sparse_disk(&data_img, 10 * 1024 * 1024 * 1024);
1347-
let vol_spec = vz_stack::VolumeSpec {
1348-
name: "journey-data".to_string(),
1349-
driver: None,
1350-
driver_opts: HashMap::new(),
1351-
};
1352-
executor.ensure_volume(&vol_spec, &data_img).unwrap();
1350+
// Ensure the named volume directory exists
1351+
let vol_dir = tmp.path().join("volumes").join("journey-data");
1352+
std::fs::create_dir_all(&vol_dir).unwrap();
13531353

13541354
let orch_config = OrchestrationConfig {
13551355
poll_interval: Some(2),
13561356
max_rounds: 40,
1357+
image_policy: ImagePolicy::AllowAll,
13571358
};
13581359
let mut orchestrator = StackOrchestrator::new(executor, reconcile_store, orch_config);
13591360

0 commit comments

Comments
 (0)