chiark / gitweb /
provide apitest::example_bundle
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 May 2021 17:16:26 +0000 (18:16 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 May 2021 17:16:56 +0000 (18:16 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/apitest.rs
apitest/at-otter.rs

index eda2c60ebc084d3f7508178b006e8299351a11e5..68e1dbf9b977f3822f9814c586301a20e262221c 100644 (file)
@@ -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<String>
index 5b2206aaac0d67acf4fe79135b3524de863728c6..3afb171a8f1b34241f7edbacc9fb0111142225cb 100644 (file)
@@ -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@")?)?;