Skip to content

Commit

Permalink
test: Refactor state sync tests to test the public interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuoWangNSL committed Mar 7, 2024
1 parent d2edb5c commit d16dec7
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 102 deletions.
3 changes: 2 additions & 1 deletion rs/state_layout/src/state_layout.rs
Expand Up @@ -56,6 +56,7 @@ pub const SPLIT_MARKER_FILE: &str = "split_from.pbuf";
pub const SUBNET_QUEUES_FILE: &str = "subnet_queues.pbuf";
pub const SYSTEM_METADATA_FILE: &str = "system_metadata.pbuf";
pub const STATS_FILE: &str = "stats.pbuf";
pub const WASM_FILE: &str = "software.wasm";

/// `ReadOnly` is the access policy used for reading checkpoints. We
/// don't want to ever modify persisted states.
Expand Down Expand Up @@ -1473,7 +1474,7 @@ impl<Permissions: AccessPolicy> CanisterLayout<Permissions> {
}

pub fn wasm(&self) -> WasmFile<Permissions> {
self.canister_root.join("software.wasm").into()
self.canister_root.join(WASM_FILE).into()
}

pub fn canister(
Expand Down
2 changes: 1 addition & 1 deletion rs/state_manager/src/state_sync.rs
Expand Up @@ -32,7 +32,7 @@ impl StateSync {
}

/// Returns requested state as a Chunkable artifact for StateSync.
pub fn create_chunkable_state(
fn create_chunkable_state(
&self,
id: &StateSyncArtifactId,
) -> Option<Box<dyn Chunkable<StateSyncMessage> + Send>> {
Expand Down

0 comments on commit d16dec7

Please sign in to comment.