pub struct Config {Show 13 fields
pub name: String,
pub modules: Vec<ModuleConfig>,
pub homeserver: HomeserverConfig,
pub up: Option<UpScript>,
pub run: Option<Script>,
pub down: Option<DownScript>,
pub docker: DockerConfig,
pub users: Vec<User>,
pub synapse: SynapseVersion,
pub credentials: DockerCredentials,
pub directories: Directories,
pub workers: WorkersConfig,
pub autoclean_on_error: bool,
}Expand description
The contents of a mx-tester.yaml
Fields
name: StringA name for this test.
This name is used to generate images, Docker networks, etc.
modules: Vec<ModuleConfig>Modules to install in Synapse.
homeserver: HomeserverConfigValues to pass through into the homeserver.yaml for this synapse.
up: Option<UpScript>A script to run at the end of the setup phase.
run: Option<Script>The testing script to run.
down: Option<DownScript>A script to run at the start of the teardown phase.
docker: DockerConfigConfiguration for the docker network.
users: Vec<User>Any users to register and make available
synapse: SynapseVersionThe version of Synapse to use
credentials: DockerCredentialsInformation for logging to a registry.
May be overridden from the command-line.
directories: DirectoriesDirectories to use for the test.
May be overridden from the command-line.
workers: WorkersConfigSpecify whether workers should be used.
May be overridden from the command-line.
autoclean_on_error: boolSpecify whether workers should be used.
May be overridden from the command-line.
Implementations
sourceimpl Config
impl Config
sourcepub fn builder(
) -> ConfigBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder(
) -> ConfigBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building Config.
On the builder, call .name(...), .modules(...)(optional), .homeserver(...)(optional), .up(...)(optional), .run(...)(optional), .down(...)(optional), .docker(...)(optional), .users(...)(optional), .synapse(...)(optional), .credentials(...)(optional), .directories(...)(optional), .workers(...)(optional), .autoclean_on_error(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Config.
sourceimpl Config
impl Config
Create a map containing the environment variables that are common to all scripts.
Callers may add additional variables that are specific to a given script step.
sourcepub fn patch_homeserver_config(&self) -> Result<(), Error>
pub fn patch_homeserver_config(&self) -> Result<(), Error>
Patch the homeserver.yaml at the given path (usually one that has been generated by synapse) with the properties in this struct (which will usually have been provided from mx-tester.yaml)
In multiple workers mode, also patch the worker files.
sourcepub fn test_root(&self) -> PathBuf
pub fn test_root(&self) -> PathBuf
The directory in which we’re putting all data for this test.
Cleaned up upon test start.
sourcepub fn synapse_root(&self) -> PathBuf
pub fn synapse_root(&self) -> PathBuf
The directory in which we’re putting everything related to synapse data for this test.
sourcepub fn synapse_data_dir(&self) -> PathBuf
pub fn synapse_data_dir(&self) -> PathBuf
The directory in which Synapse may write data.
sourcepub fn synapse_workers_dir(&self) -> PathBuf
pub fn synapse_workers_dir(&self) -> PathBuf
The directory in which we’re putting the configuration of workers for this test.
sourcepub fn etc_dir(&self) -> PathBuf
pub fn etc_dir(&self) -> PathBuf
The directory in which we’re putting files that go to subdirectories of /etc in in the guest.
pub fn scripts_logs_dir(&self) -> PathBuf
sourcepub fn setup_container_name(&self) -> String
pub fn setup_container_name(&self) -> String
The name for the container we’re using to setup Synapse.
sourcepub fn run_container_name(&self) -> String
pub fn run_container_name(&self) -> String
The name for the container we’re using to actually run Synapse.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more