test: align pending orchestrator restore contract
This commit is contained in:
@@ -13131,7 +13131,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn production_profile_backend_launches_and_restores_workspace_orchestrator() {
|
async fn production_profile_backend_rejects_unrecoverable_pending_orchestrator_restore() {
|
||||||
let workspace = tempfile::tempdir().unwrap();
|
let workspace = tempfile::tempdir().unwrap();
|
||||||
init_clean_git_workspace(workspace.path());
|
init_clean_git_workspace(workspace.path());
|
||||||
let config = test_server_config(workspace.path());
|
let config = test_server_config(workspace.path());
|
||||||
@@ -13171,17 +13171,19 @@ mod tests {
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(stopped.state, WorkerOperationState::Accepted);
|
assert_eq!(stopped.state, WorkerOperationState::Accepted);
|
||||||
let Json(restored) = scoped_start_workspace_orchestrator(
|
let error = scoped_start_workspace_orchestrator(
|
||||||
State(api),
|
State(api.clone()),
|
||||||
AxumPath(ScopedWorkspacePath { workspace_id }),
|
AxumPath(ScopedWorkspacePath {
|
||||||
|
workspace_id: workspace_id.clone(),
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.expect_err("pending Workspace Orchestrator restore without durable Prompt must fail");
|
||||||
assert_eq!(restored.disposition, "restored");
|
assert!(
|
||||||
assert!(restored.online);
|
format!("{error:?}").contains(
|
||||||
assert_eq!(
|
"pending Workspace Worker restore requires operation-owned launch material"
|
||||||
restored.worker.expect("restored Orchestrator").worker,
|
),
|
||||||
worker
|
"unexpected restore error: {error:?}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user