test/osbuild: use proper object in stage run test
Create a proper `ObjectStore.Object` to use as tree for the `run` method of `Stage`, since that is what is also normally passed to it from `Pipeline.run`. It prepares for a future where `Object` is not just used as `os.PathLike`.
This commit is contained in:
parent
baa547b5e9
commit
d48f4eb4ff
1 changed files with 3 additions and 3 deletions
|
|
@ -40,16 +40,16 @@ class TestDescriptions(unittest.TestCase):
|
|||
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
|
||||
data = pathlib.Path(tmpdir, "data")
|
||||
storedir = pathlib.Path(tmpdir, "store")
|
||||
root = pathlib.Path("/")
|
||||
runner = Runner(index.detect_host_runner())
|
||||
monitor = NullMonitor(sys.stderr.fileno())
|
||||
libdir = os.path.abspath(os.curdir)
|
||||
store = ObjectStore(storedir)
|
||||
data.mkdir()
|
||||
|
||||
res = stage.run(data, runner, root, store, monitor, libdir)
|
||||
with ObjectStore(storedir) as store:
|
||||
data = store.new(stage.id)
|
||||
res = stage.run(data, runner, root, store, monitor, libdir)
|
||||
|
||||
self.assertEqual(res.success, True)
|
||||
self.assertEqual(res.id, stage.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue