From d937dc3af47c2cb30b3df5f10e7d95aeb34e3230 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 4 Apr 2021 18:06:45 +0100 Subject: [PATCH] apitest: Make mgmt_conn be ForGame Signed-off-by: Ian Jackson --- apitest/apitest.rs | 7 ++++++- src/mgmtchannel.rs | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apitest/apitest.rs b/apitest/apitest.rs index 03e2a235..65856dde 100644 --- a/apitest/apitest.rs +++ b/apitest/apitest.rs @@ -67,7 +67,7 @@ pub struct Opts { #[derive(Debug)] pub struct SetupCore { pub ds: DirSubst, - pub mgmt_conn: MgmtChannel, + pub mgmt_conn: MgmtChannelForGame, server_child: Child, pub wanted_tests: TrackWantedTests, } @@ -886,6 +886,11 @@ pub fn setup_core(module_paths: &[&str], early_args: EarlyArgPredicate) -> let (mgmt_conn, server_child) = prepare_gameserver(&cln, &ds).always_context("setup game server")?; + let mgmt_conn = mgmt_conn.for_game( + TABLE.parse()?, + MgmtGameUpdateMode::Online + ); + let instance_name = prepare_game(&ds, TABLE).context("setup game")?; diff --git a/src/mgmtchannel.rs b/src/mgmtchannel.rs index 9fd6f4b4..edb578be 100644 --- a/src/mgmtchannel.rs +++ b/src/mgmtchannel.rs @@ -123,6 +123,7 @@ impl IoTryClone for UnixStream { } +#[derive(Debug)] pub struct MgmtChannelForGame { pub chan: MgmtChannel, pub game: InstanceName, -- 2.30.2