From 49124367a3e286fe249fbf757589e2c6c83cb6fb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 2 Jun 2021 17:56:58 +0100 Subject: [PATCH] sshkeys: Tests: Rework dummy key handling Signed-off-by: Ian Jackson --- apitest/at-otter.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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"; -- 2.30.2