diff options
Diffstat (limited to 'tests/common')
| -rw-r--r-- | tests/common/mod.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/common/mod.rs b/tests/common/mod.rs index f1f3f74..6f80d65 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -127,6 +127,17 @@ impl Host { enstate::migrate::migrate(&schema.0, &store, dry_run, &self.systemctl()).unwrap() } + /// Stages a submission for the generation of `schema`, before switching to it. + pub fn stage(&self, schema: &(Schema, Vec<u8>), dir: &Path) -> Plan { + let submission = Submission::load(dir).unwrap(); + let store = self.store(); + let lock = store.lock().unwrap(); + plan::plan(&schema.0, &store, &submission) + .unwrap() + .stage(&store, &schema.1, lock) + .unwrap() + } + /// The current snapshot's id of `channel`. pub fn snapshot(&self, channel: &str) -> Option<String> { self.store() |
