/// Creates testkit with supervisor and several versions of migrating service.
///
/// One instance (with lowest version, "0.1.0") is started by default.
Creates testkit with supervisor and several versions of migrating service.
One instance (with lowest version, "0.1.0") is started by default.
Creates testkit with supervisor and several versions of migrating service . One instance ( with lowest version " 0 . 1 . 0 " ) is started by default .
fn testkit_with_supervisor_and_service(validator_count: u16) -> TestKit {
    // Initialize builder.
    let builder = TestKitBuilder::validator().with_validators(validator_count);
    // Add supervisor.
    let builder = builder
        .with_rust_service(Supervisor)
        .with_artifact(Supervisor.artifact_id())
        .with_instance(Supervisor::simple());
    // Add MigrationService with running instance.
    let builder = builder.with_default_rust_service(MigrationService);
    // Add migrating artifact for version 0.1.1.
    let builder = builder
        .with_migrating_rust_service(MigrationServiceV01_1)
        .with_artifact(MigrationServiceV01_1.artifact_id());
    // Add migrating artifact for version 0.2.
    let builder = builder
        .with_migrating_rust_service(MigrationServiceV02)
        .with_artifact(MigrationServiceV02.artifact_id());
    // Add artifact for version 0.5.
    let builder = builder
        .with_migrating_rust_service(MigrationServiceV05)
        .with_artifact(MigrationServiceV05.artifact_id());
    // Add artifact for version 0.5.1.
    let builder = builder
        .with_migrating_rust_service(MigrationServiceV05_1)
        .with_artifact(MigrationServiceV05_1.artifact_id());
    builder.build()
}
fn testkit_with_supervisor_and_service ( validator_count : u16 ) -> TestKit { // Initialize builder. let builder = TestKitBuilder :: validator ( ) . with_validators ( validator_count ) ; // Add supervisor. let builder = builder . with_rust_service ( Supervisor ) . with_artifact ( Supervisor . artifact_id ( ) ) . with_instance ( Supervisor :: simple ( ) ) ; // Add MigrationService with running instance. let builder = builder . with_default_rust_service ( MigrationService ) ; // Add migrating artifact for version 0.1.1. let builder = builder . with_migrating_rust_service ( MigrationServiceV01_1 ) . with_artifact ( MigrationServiceV01_1 . artifact_id ( ) ) ; // Add migrating artifact for version 0.2. let builder = builder . with_migrating_rust_service ( MigrationServiceV02 ) . with_artifact ( MigrationServiceV02 . artifact_id ( ) ) ; // Add artifact for version 0.5. let builder = builder . with_migrating_rust_service ( MigrationServiceV05 ) . with_artifact ( MigrationServiceV05 . artifact_id ( ) ) ; // Add artifact for version 0.5.1. let builder = builder . with_migrating_rust_service ( MigrationServiceV05_1 ) . with_artifact ( MigrationServiceV05_1 . artifact_id ( ) ) ; builder . build ( ) }
Creates testkit with supervisor and several versions of migrating service.
Creates testkit with supervisor and several versions of migrating service .
validator_count
u16