summaryrefslogtreecommitdiff
path: root/src/app/api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/api.rs')
-rw-r--r--src/app/api.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/app/api.rs b/src/app/api.rs
index eeb1127f..8743c08f 100644
--- a/src/app/api.rs
+++ b/src/app/api.rs
@@ -1158,6 +1158,27 @@ fn agent_manifest_info(
}
#[cfg(test)]
+pub(super) mod test_support {
+ pub(crate) fn exiting_test_command() -> &'static str {
+ #[cfg(windows)]
+ {
+ "C:\\Windows\\System32\\whoami.exe"
+ }
+ #[cfg(not(windows))]
+ {
+ "/usr/bin/true"
+ }
+ }
+
+ pub(crate) fn shutdown_test_runtimes(app: &mut crate::app::App) {
+ let runtimes: Vec<_> = app.terminal_runtimes.drain().collect();
+ for (_terminal_id, runtime) in runtimes {
+ runtime.shutdown();
+ }
+ }
+}
+
+#[cfg(test)]
mod tests {
use super::*;
use crate::detect::{Agent, AgentState};