Publish the Session Terminal fixture generation
This commit is contained in:
parent
19c8ca6523
commit
2af8a4f09f
1 changed files with 19 additions and 0 deletions
|
|
@ -287,7 +287,9 @@ fn run_session_terminal_matrix() -> Result<(), MatrixError> {
|
|||
.join(hex(ContainerId::new([6; 32]).as_bytes()))
|
||||
.join("bin/lazaret-sandbox-init"),
|
||||
)?;
|
||||
set_fixture_generation_decision(&fixture.store, DurableDecision::Preparing)?;
|
||||
let runtime = fixture.launch_committed()?;
|
||||
set_fixture_generation_decision(&fixture.store, DurableDecision::Published)?;
|
||||
let session_id = SessionId::new([31; 32]);
|
||||
let mut session = Session {
|
||||
generation_id: GenerationId::new(7),
|
||||
|
|
@ -441,6 +443,23 @@ fn run_session_terminal_matrix() -> Result<(), MatrixError> {
|
|||
.map_err(failure)
|
||||
}
|
||||
|
||||
fn set_fixture_generation_decision(
|
||||
store: &HostCoordinatorDomainStore,
|
||||
decision: DurableDecision,
|
||||
) -> Result<(), MatrixError> {
|
||||
let mut generation = store
|
||||
.snapshot()
|
||||
.map_err(failure)?
|
||||
.generations
|
||||
.into_iter()
|
||||
.find(|generation| generation.generation_id == GenerationId::new(7))
|
||||
.ok_or_else(|| failure("Session Terminal fixture generation is absent"))?;
|
||||
generation.durable_decision = decision;
|
||||
store
|
||||
.apply(&[DomainStoreMutation::PutGeneration(generation)])
|
||||
.map_err(failure)
|
||||
}
|
||||
|
||||
fn wait_for_path(path: &Path) -> Result<(), MatrixError> {
|
||||
for _ in 0..2_000 {
|
||||
if path.is_file() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue