From: Ian Jackson Date: Mon, 3 May 2021 17:16:26 +0000 (+0100) Subject: provide apitest::example_bundle X-Git-Tag: otter-0.6.0~429 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=139bd544537eff095257abdca3d3aca483017608;p=otter.git provide apitest::example_bundle Signed-off-by: Ian Jackson --- 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@")?)?;