Skip to main content

Mountain/Environment/TestProvider/
TestProviderState.rs

1#![allow(non_snake_case)]
2
3//! Aggregate state for the TestProvider: registered controllers and
4//! currently active test runs. Held inside `ApplicationState` behind a
5//! `tokio::sync::RwLock` for concurrent reads during test runs.
6
7use std::collections::HashMap;
8
9use crate::Environment::TestProvider::{TestControllerState, TestRun};
10
11#[derive(Debug)]
12pub struct Struct {
13	pub Controllers:HashMap<String, TestControllerState::Struct>,
14	pub ActiveRuns:HashMap<String, TestRun::Struct>,
15}
16
17impl Struct {
18	pub fn new() -> Self { Self { Controllers:HashMap::new(), ActiveRuns:HashMap::new() } }
19}
20
21impl Default for Struct {
22	fn default() -> Self { Self::new() }
23}