mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
Add a "check-config" command to validate config files & tests for it
This commit is contained in:
parent
70ee206031
commit
26ba489aa3
24 changed files with 492 additions and 0 deletions
13
src/error.rs
13
src/error.rs
|
|
@ -45,6 +45,9 @@ pub(crate) enum Main {
|
|||
|
||||
#[error("failed to install global default tracing subscriber")]
|
||||
SetSubscriber(#[from] tracing::subscriber::SetGlobalDefaultError),
|
||||
|
||||
#[error(transparent)]
|
||||
CheckConfigCommand(#[from] CheckConfigCommand),
|
||||
}
|
||||
|
||||
/// Errors returned from the `serve` CLI subcommand.
|
||||
|
|
@ -72,6 +75,16 @@ pub(crate) enum ServeCommand {
|
|||
ServerNameChanged(#[from] ServerNameChanged),
|
||||
}
|
||||
|
||||
/// Errors returned from the `check-config` CLI subcommand.
|
||||
// Missing docs are allowed here since that kind of information should be
|
||||
// encoded in the error messages themselves anyway.
|
||||
#[allow(missing_docs)]
|
||||
#[derive(Error, Debug)]
|
||||
pub(crate) enum CheckConfigCommand {
|
||||
#[error("failed to validate configuration")]
|
||||
Config(#[from] Config),
|
||||
}
|
||||
|
||||
/// Error generated if `server_name` has changed or if checking this failed
|
||||
// Missing docs are allowed here since that kind of information should be
|
||||
// encoded in the error messages themselves anyway.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue