Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
Merge pull request #24 from radixdlt/templates
Browse files Browse the repository at this point in the history
  • Loading branch information
CyonAlexRDX authored Nov 30, 2024
2 parents 0c5f86f + 2e9ce67 commit bc838e2
Show file tree
Hide file tree
Showing 10 changed files with 656 additions and 479 deletions.
1 change: 1 addition & 0 deletions crates/rules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ serde_json = { version = "1.0.133", features = ["preserve_order"] }
assert-json-diff = "2.0.2"
once_cell = "1.20.2"
itertools = "0.13.0"
uuid = { version = "1.11.0", features = ["serde", "v4"] }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(tarpaulin_include)"] }
38 changes: 19 additions & 19 deletions crates/rules/src/matrices/builder/matrix_builder_unit_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ mod shield_configs {
use super::*;

#[test]
fn config_1_1() {
fn config_11() {
let mut sut = make();

// Primary
Expand Down Expand Up @@ -1285,7 +1285,7 @@ mod shield_configs {
}

#[test]
fn config_1_2() {
fn config_12() {
let mut sut = make();

// Primary
Expand Down Expand Up @@ -1335,7 +1335,7 @@ mod shield_configs {
}

#[test]
fn config_1_3() {
fn config_13() {
let mut sut = make();

// Primary
Expand Down Expand Up @@ -1386,7 +1386,7 @@ mod shield_configs {
}

#[test]
fn config_1_4() {
fn config_14() {
let mut sut = make();

// Primary
Expand Down Expand Up @@ -1426,7 +1426,7 @@ mod shield_configs {
}

#[test]
fn config_1_5() {
fn config_15() {
let mut sut = make();

// Primary
Expand Down Expand Up @@ -1466,7 +1466,7 @@ mod shield_configs {
}

#[test]
fn config_2_1() {
fn config_21() {
let mut sut = make();

// Primary
Expand Down Expand Up @@ -1514,7 +1514,7 @@ mod shield_configs {
}

#[test]
fn config_2_2() {
fn config_22() {
let mut sut = make();

// Primary
Expand Down Expand Up @@ -1562,13 +1562,13 @@ mod shield_configs {
}

#[test]
fn config_2_3() {
fn config_23() {
let mut sut = make();

// Primary
// TODO: Ask Matt about this, does he mean Threshold(1) or Override?
sut.add_factor_source_to_primary_override(FactorSourceID::sample_ledger())
sut.add_factor_source_to_primary_threshold(FactorSourceID::sample_ledger())
.unwrap();
sut.set_threshold(1).unwrap();

// Recovery
sut.add_factor_source_to_recovery_override(FactorSourceID::sample_ledger_other())
Expand All @@ -1585,9 +1585,9 @@ mod shield_configs {
built,
MatrixOfFactorSourceIds::with_roles(
RoleWithFactorSourceIds::primary_with_factors(
0,
[],
1,
[FactorSourceID::sample_ledger(),],
[],
),
RoleWithFactorSourceIds::recovery_with_factors([
FactorSourceID::sample_ledger_other(),
Expand All @@ -1602,13 +1602,13 @@ mod shield_configs {
}

#[test]
fn config_2_4() {
fn config_24() {
let mut sut = make();

// Primary
// TODO: Ask Matt about this, does he mean Threshold(1) or Override?
sut.add_factor_source_to_primary_override(FactorSourceID::sample_device())
sut.add_factor_source_to_primary_threshold(FactorSourceID::sample_device())
.unwrap();
sut.set_threshold(1).unwrap();

// Recovery
sut.add_factor_source_to_recovery_override(FactorSourceID::sample_ledger())
Expand All @@ -1625,9 +1625,9 @@ mod shield_configs {
built,
MatrixOfFactorSourceIds::with_roles(
RoleWithFactorSourceIds::primary_with_factors(
0,
[],
1,
[FactorSourceID::sample_device(),],
[],
),
RoleWithFactorSourceIds::recovery_with_factors([
FactorSourceID::sample_ledger(),
Expand All @@ -1642,7 +1642,7 @@ mod shield_configs {
}

#[test]
fn config_3() {
fn config_30() {
let mut sut = make();

// Primary
Expand Down Expand Up @@ -1693,7 +1693,7 @@ mod shield_configs {
}

#[test]
fn config_4() {
fn config_40() {
let mut sut = make();

// Primary
Expand Down
Loading

0 comments on commit bc838e2

Please sign in to comment.