From 139bd544537eff095257abdca3d3aca483017608 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 3 May 2021 18:16:26 +0100 Subject: [PATCH] provide apitest::example_bundle Signed-off-by: Ian Jackson --- apitest/apitest.rs | 4 ++++ apitest/at-otter.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apitest/apitest.rs b/apitest/apitest.rs index eda2c60e..68e1dbf9 100644 --- a/apitest/apitest.rs +++ b/apitest/apitest.rs @@ -688,6 +688,10 @@ impl DirSubst { format!("{}/specs" , &self.src) } + pub fn example_bundle(&self) -> String { + self.subst("@src@/examples/test-bundle.zip").unwrap() + } + #[throws(AE)] pub fn otter<'s,S>(&self, xargs: &'s [S]) -> OtterOutput where &'s S: Into diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 5b2206aa..3afb171a 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -693,7 +693,7 @@ impl Ctx { #[throws(Explode)] fn bundles(&mut self) { - let bundle_file = self.su().ds.subst("@src@/examples/test-bundle.zip")?; + let bundle_file = self.su().ds.example_bundle(); let ds = self.su().ds.also(&[("bundle", &bundle_file)]); self.otter(&ds.ss("upload-bundle @table@ @bundle@")?)?; let mut bundles = self.otter(&ds.ss("list-bundles @table@")?)?; -- 2.30.2