aboutsummaryrefslogtreecommitdiff
path: root/test/test_general.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_general.py')
-rw-r--r--test/test_general.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_general.py b/test/test_general.py
index eb3185d..43f3635 100644
--- a/test/test_general.py
+++ b/test/test_general.py
@@ -1,3 +1,4 @@
+import os
import subprocess
import unittest
@@ -10,6 +11,19 @@ class SalisTest(unittest.TestCase):
def tearDown(self):
self.tempdir.cleanup()
+ def file_list_new(self, name):
+ return [
+ os.path.join(self.tempdir.name, name, name),
+ os.path.join(self.tempdir.name, name, f"{name}.sqlite3"),
+ os.path.join(self.tempdir.name, name, f"{name}-{0:016x}"),
+ os.path.join(self.tempdir.name, name, "opts.json"),
+ os.path.join(self.tempdir.name, name, "evas", f"evas-{0:016x}"),
+ ]
+
+ def assert_file_list_exists(self, files):
+ for file in files:
+ assert os.path.isfile(file), f"{file} does not exist"
+
@staticmethod
def run_subprocess(cmd):
subprocess.run(cmd.split(), check=True, stdout=subprocess.DEVNULL)
@@ -24,6 +38,7 @@ class SalisTest(unittest.TestCase):
def test_wrapper(self):
cmd = f"./salis.py new -a{anc} -A{anc_path} -C{clones} -c{cores} -H{self.tempdir.name} -n{name} -u{ui} -U{ui_path} -v{vm_arch}"
subprocess.run(cmd.split(), check=True, stdout=subprocess.DEVNULL)
+ self.assert_file_list_exists(self.file_list_new(name))
test_case(self)
return test_wrapper