Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcolombo committed Jun 17, 2024
1 parent a7e1681 commit bac4652
Showing 1 changed file with 26 additions and 31 deletions.
57 changes: 26 additions & 31 deletions nexus/src/app/sagas/instance_start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,11 +746,10 @@ mod test {
let opctx = test_helpers::test_opctx(cptestctx);
let instance = create_instance(client).await;
let instance_id = InstanceUuid::from_untyped_uuid(instance.identity.id);
let db_instance =
test_helpers::instance_fetch(cptestctx, instance_id)
.await
.instance()
.clone();
let db_instance = test_helpers::instance_fetch(cptestctx, instance_id)
.await
.instance()
.clone();

let params = Params {
serialized_authn: authn::saga::Serialized::for_opctx(&opctx),
Expand All @@ -762,14 +761,13 @@ mod test {
nexus.run_saga(saga).await.expect("Start saga should succeed");

test_helpers::instance_simulate(cptestctx, &instance_id).await;
let vmm_state =
test_helpers::instance_fetch(cptestctx, instance_id)
.await
.vmm()
.as_ref()
.expect("running instance should have a vmm")
.runtime
.state;
let vmm_state = test_helpers::instance_fetch(cptestctx, instance_id)
.await
.vmm()
.as_ref()
.expect("running instance should have a vmm")
.runtime
.state;

assert_eq!(vmm_state, nexus_db_model::VmmState::Running);
}
Expand Down Expand Up @@ -848,11 +846,10 @@ mod test {
let opctx = test_helpers::test_opctx(cptestctx);
let instance = create_instance(client).await;
let instance_id = InstanceUuid::from_untyped_uuid(instance.identity.id);
let db_instance =
test_helpers::instance_fetch(cptestctx, instance_id)
.await
.instance()
.clone();
let db_instance = test_helpers::instance_fetch(cptestctx, instance_id)
.await
.instance()
.clone();

let params = Params {
serialized_authn: authn::saga::Serialized::for_opctx(&opctx),
Expand All @@ -862,14 +859,13 @@ mod test {
let dag = create_saga_dag::<SagaInstanceStart>(params).unwrap();
test_helpers::actions_succeed_idempotently(nexus, dag).await;
test_helpers::instance_simulate(cptestctx, &instance_id).await;
let vmm_state =
test_helpers::instance_fetch(cptestctx, instance_id)
.await
.vmm()
.as_ref()
.expect("running instance should have a vmm")
.runtime
.state;
let vmm_state = test_helpers::instance_fetch(cptestctx, instance_id)
.await
.vmm()
.as_ref()
.expect("running instance should have a vmm")
.runtime
.state;

assert_eq!(vmm_state, nexus_db_model::VmmState::Running);
}
Expand All @@ -890,11 +886,10 @@ mod test {
let opctx = test_helpers::test_opctx(cptestctx);
let instance = create_instance(client).await;
let instance_id = InstanceUuid::from_untyped_uuid(instance.identity.id);
let db_instance =
test_helpers::instance_fetch(cptestctx, instance_id)
.await
.instance()
.clone();
let db_instance = test_helpers::instance_fetch(cptestctx, instance_id)
.await
.instance()
.clone();

let params = Params {
serialized_authn: authn::saga::Serialized::for_opctx(&opctx),
Expand Down

0 comments on commit bac4652

Please sign in to comment.