canic-host 0.68.16

Host-side build, install, deployment, and fleet-template library for Canic workspaces
Documentation
use super::*;

pub(in crate::deployment_truth::tests) const SAMPLE_CONFIG: &str = r#"
controllers = []
app_index = []

[fleet]
name = "demo"

[roles.root]
kind = "root"
package = "root"

[roles.user_hub]
kind = "canister"
package = "user_hub"

[roles.user_shard]
kind = "canister"
package = "user_shard"

[app]
init_mode = "enabled"
[app.whitelist]

[subnets.prime.canisters.root]
kind = "root"

[subnets.prime.canisters.user_hub]
kind = "service"
"#;

pub(in crate::deployment_truth::tests) struct LimitedExecutor {
    pub(in crate::deployment_truth::tests) context: DeploymentExecutionContextV1,
}

impl DeploymentExecutor for LimitedExecutor {
    fn execution_context(&self) -> DeploymentExecutionContextV1 {
        self.context.clone()
    }
}

pub(in crate::deployment_truth::tests) struct FixtureRootSubnetEvidenceSource {
    pub(in crate::deployment_truth::tests) result: Result<RootSubnetEvidence, String>,
}

impl RootSubnetEvidenceSource for FixtureRootSubnetEvidenceSource {
    fn root_subnet_evidence(
        &self,
        _network: &str,
        _icp_root: &std::path::Path,
        _canister_id: &str,
    ) -> Result<RootSubnetEvidence, String> {
        self.result.clone()
    }
}