Skip to content

Commit

Permalink
fix swift tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon committed Dec 19, 2024
1 parent cd456d2 commit e8d16d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ struct ShieldTests {

#expect(builder.validate() == .ConfirmationRoleMustHaveAtLeastOneFactor)
builder.addFactorSourceToConfirmationOverride(factorSourceId: .sampleArculus)

builder.setAuthenticationSigningFactor(new: .sampleDevice)

#expect(builder.validate() == nil)
#expect((try? builder.build()) != nil)
}
Expand Down Expand Up @@ -173,6 +176,8 @@ struct ShieldTests {
builder.addFactorSourceToRecoveryOverride(factorSourceId: .sampleArculus)
builder.addFactorSourceToConfirmationOverride(factorSourceId: .sampleArculusOther)

builder.setAuthenticationSigningFactor(new: .sampleDevice)

let shield = try! builder.build()

#expect(shield.matrixOfFactors.primaryRole.overrideFactors.isEmpty)
Expand Down Expand Up @@ -205,6 +210,8 @@ struct ShieldTests {
builder.removeFactorFromPrimary(factorSourceId: .sampleArculusOther)
builder.removeFactorFromRecovery(factorSourceId: .sampleLedgerOther)

builder.setAuthenticationSigningFactor(new: .sampleDevice)

// Validate
#expect(builder.validate() == nil)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ impl FactorInstancesProvider {
Ok((derivation_preset, per_factor_paths))
})
.collect::<Result<
// IndexMap<FactorSourceIDFromHash, IndexSet<DerivationPath>>,
IndexMap<
DerivationPreset,
IndexMap<FactorSourceIDFromHash, IndexSet<DerivationPath>>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ impl SecurityStructureOfFactorInstances {
let _ = existing.shift_remove(&instance); // don't forget to consume it!
Ok(instance)
} else {
println!("👨‍🔬 SSFI ❌ get_mut failed => MissingRolaKeyForSecurityStructureOfFactorInstances ❌");
Err(CommonError::MissingRolaKeyForSecurityStructureOfFactorInstances)
}?;

Expand Down

0 comments on commit e8d16d6

Please sign in to comment.