mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-03-31 08:13:48 +00:00
Hide raw scenario sources behind semantic accessors
This commit is contained in:
parent
05b907d8ef
commit
f79eb34a50
@ -113,6 +113,7 @@ impl<E: Application, Caps> Scenario<E, Caps> {
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[doc(hidden)]
|
||||
pub fn sources(&self) -> &ScenarioSources {
|
||||
&self.sources
|
||||
}
|
||||
@ -122,6 +123,11 @@ impl<E: Application, Caps> Scenario<E, Caps> {
|
||||
self.sources.existing_cluster()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn uses_existing_cluster(&self) -> bool {
|
||||
self.sources.uses_existing_cluster()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[doc(hidden)]
|
||||
pub fn attached_source(&self) -> Option<&AttachSource> {
|
||||
|
||||
@ -41,7 +41,7 @@ pub enum SourceResolveError {
|
||||
pub fn build_source_orchestration_plan<E: Application, Caps>(
|
||||
scenario: &Scenario<E, Caps>,
|
||||
) -> Result<SourceOrchestrationPlan, SourceOrchestrationPlanError> {
|
||||
SourceOrchestrationPlan::try_from_sources(scenario.sources())
|
||||
Ok(scenario.source_orchestration_plan().clone())
|
||||
}
|
||||
|
||||
/// Resolves runtime source nodes via unified providers from orchestration plan.
|
||||
|
||||
@ -71,7 +71,7 @@ impl<E: ComposeDeployEnv> DeploymentOrchestrator<E> {
|
||||
}
|
||||
})?;
|
||||
|
||||
if scenario.sources().uses_existing_cluster() {
|
||||
if scenario.uses_existing_cluster() {
|
||||
return self
|
||||
.deploy_attached_only::<Caps>(scenario, source_plan)
|
||||
.await
|
||||
|
||||
@ -179,7 +179,7 @@ where
|
||||
|
||||
let observability = resolve_observability_inputs(scenario.capabilities())?;
|
||||
|
||||
if scenario.sources().uses_existing_cluster() {
|
||||
if scenario.uses_existing_cluster() {
|
||||
let runner = deploy_attached_only::<E, Caps>(scenario, source_plan, observability).await?;
|
||||
return Ok((runner, attached_metadata(scenario)));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user