From 6befa3b2393c35d0825c90303fb5ba7225729af2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 3 May 2021 17:55:34 +0100 Subject: [PATCH] at-otter: Put the test game back at the end for ad-hoc tests Signed-off-by: Ian Jackson --- apitest/at-otter.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 2c591ac2..541e0165 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -703,6 +703,14 @@ impl Ctx { let st = Command::new("cmp").args(&[&bundle_file, "00000.zip"]).status()?; if ! st.success() { panic!("cmp failed {}", st) } } + + #[throws(Explode)] + fn put_back(&mut self) { + // Put things back for the ad-hoc human tester + let su = self.su(); + prepare_game(&su.ds, &self.prctx, TABLE)?; + su.ds.setup_static_users(&mut *su.mgmt_conn.borrow_mut(), default())?; + } } #[throws(AE)] @@ -711,6 +719,7 @@ fn tests(mut c: Ctx) { test!(c, "hidden-hand", c.hidden_hand() ?); test!(c, "specs", c.chdir_root(|c| c.specs() )); test!(c, "bundles", c.bundles() ?); + test!(c, "put-back", c.put_back() ?); } #[throws(AE)] -- 2.30.2