From: Ian Jackson Date: Wed, 2 Jun 2021 16:56:58 +0000 (+0100) Subject: sshkeys: Tests: Rework dummy key handling X-Git-Tag: otter-0.7.0~99 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=49124367a3e286fe249fbf757589e2c6c83cb6fb;p=otter.git sshkeys: Tests: Rework dummy key handling Signed-off-by: Ian Jackson --- diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 8e6acc2f..fdd8414c 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -211,10 +211,13 @@ impl Ctx { )?); self.otter(&command)?; - let ds = ds.also(&[ - ("dummy_key_path", ds.subst("@src@/apitest/dummy.pub")?), - ("authkeys", ds.subst("@abstmp@/authorized_keys")?), - ]); + let ds = { + let dummy_key_path = ds.subst("@src@/apitest/dummy.pub")?; + ds.also(&[ + ("dummy_key_path", dummy_key_path), + ("authkeys", ds.subst("@abstmp@/authorized_keys")?), + ]) + }; static STATIC_TEST: &str = "# example static data -- for test\n";