Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(storage provider pallet): add setup for multiple partitions #194

Merged
merged 17 commits into from
Aug 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: test
cernicc committed Aug 14, 2024
commit 249ad1dba2d2839d3a9ee406973eb40ded86764f
11 changes: 9 additions & 2 deletions pallets/storage-provider/src/tests/declare_faults.rs
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ use crate::{
deadline::{DeadlineError, Deadlines},
fault::{DeclareFaultsParams, FaultDeclaration},
pallet::{Error, Event, StorageProviders, DECLARATIONS_MAX},
partition::PartitionError,
sector::ProveCommitSector,
sector_map::SectorMapError,
tests::{
@@ -152,7 +151,7 @@ fn multiple_deadline_faults() {

let partition = 0;
let deadlines = vec![0, 1, 2, 3, 4];
let sectors = vec![1];
let sectors = vec![0];

// Fault declaration and extrinsic
let fault_declaration = DeclareFaultsBuilder::default()
@@ -197,6 +196,14 @@ fn multiple_deadline_faults() {
sectors: create_set(&[0]),
},
], Error::<Test>::DeadlineError(DeadlineError::PartitionNotFound).into())]
// Sector specified is not used. This is currently not failing. Should it?
cernicc marked this conversation as resolved.
Show resolved Hide resolved
cernicc marked this conversation as resolved.
Show resolved Hide resolved
// #[case(bounded_vec![
// FaultDeclaration {
// deadline: 0,
// partition: 0,
// sectors: create_set(&[99]),
// },
// ], Error::<Test>::DeadlineError(DeadlineError::PartitionNotFound).into())]
fn fails_data_missing_malformed(
#[case] declared_faults: BoundedVec<FaultDeclaration, ConstU32<DECLARATIONS_MAX>>,
#[case] expected_error: Error<Test>,