add smoketest-assist execution mode
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
fcb9d04d9e
commit
f4db6292b3
1 changed files with 11 additions and 4 deletions
|
@ -1,7 +1,4 @@
|
|||
|
||||
use conduit::{
|
||||
debug, error, implement, info,
|
||||
};
|
||||
use conduit::{debug, debug_info, error, implement, info};
|
||||
use ruma::events::room::message::RoomMessageEventContent;
|
||||
use tokio::time::{sleep, Duration};
|
||||
|
||||
|
@ -33,6 +30,16 @@ pub(super) async fn startup_execute(&self) {
|
|||
self.startup_execute_command(i, command.clone()).await;
|
||||
tokio::task::yield_now().await;
|
||||
}
|
||||
|
||||
// The smoketest functionality is placed here for now and simply initiates
|
||||
// shutdown after all commands have executed.
|
||||
if self.services.server.config.test.contains("smoke") {
|
||||
debug_info!("Smoketest mode. All commands complete. Shutting down now...");
|
||||
self.services
|
||||
.server
|
||||
.shutdown()
|
||||
.unwrap_or_else(error::default_log);
|
||||
}
|
||||
}
|
||||
|
||||
/// Execute one admin command after startup
|
||||
|
|
Loading…
Add table
Reference in a new issue