chiark / gitweb /
sshkeys: Tests: Rework dummy key handling
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 2 Jun 2021 16:56:58 +0000 (17:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 2 Jun 2021 17:37:21 +0000 (18:37 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-otter.rs

index 8e6acc2faaf64e3c828ee70ac986772c6c60f19c..fdd8414c64f5100d5e09a8aad91a98d0f16aa6f0 100644 (file)
@@ -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";