bootstrapRuntime method

Future<EnsembleConfig> bootstrapRuntime(
  1. EnsembleConfig config,
  2. EnsembleTestSetup setup, {
  3. MockAPIProvider? httpMock,
})

Implementation

Future<EnsembleConfig> bootstrapRuntime(
  EnsembleConfig config,
  EnsembleTestSetup setup, {
  MockAPIProvider? httpMock,
}) async {
  ensureTestPlugins();

  applyYamlTestBootstrap(config, setup);
  Ensemble().setEnsembleConfig(config);

  if (httpMock != null) {
    installHttpMockProvider(config, httpMock);
  }

  await Ensemble().initManagers();

  config.apiProviders ??= {'http': HTTPAPIProvider()};
  config.apiProviders!.putIfAbsent('http', () => HTTPAPIProvider());

  YamlTestSession.markRuntimeBootstrapped();
  return config;
}