chiark / gitweb /
apitest: Make mgmt_conn be ForGame
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Apr 2021 17:06:45 +0000 (18:06 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Apr 2021 17:50:45 +0000 (18:50 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/apitest.rs
src/mgmtchannel.rs

index 03e2a235d5a2635446a115cccf3ade4e82efdbc8..65856dde27c78f1b4431ccac59da82bd214ee059 100644 (file)
@@ -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<O>(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")?;
 
index 9fd6f4b4917a763b5461d433dd6de04094a9b7fe..edb578be4a328783328bd8dfba18616dabcddb44 100644 (file)
@@ -123,6 +123,7 @@ impl IoTryClone for UnixStream {
 }
 
 
+#[derive(Debug)]
 pub struct MgmtChannelForGame {
   pub chan: MgmtChannel,
   pub game: InstanceName,