mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-05 07:03:38 +02:00
Fix handling empty vm_type in Store.last_buildroot
This commit is contained in:
@@ -36,6 +36,14 @@ class TestGitStore(unittest.TestCase):
|
||||
store = GitStore(self.tmpdir)
|
||||
self.assertEqual(store.last_buildroot, ("repo", "arch", "vm_type"))
|
||||
|
||||
def test_last_buildroot_empty_vm_type(self):
|
||||
store = GitStore(self.tmpdir)
|
||||
self.assertEqual(store.last_buildroot, None)
|
||||
store.last_buildroot = ("repo", "arch", None)
|
||||
|
||||
store = GitStore(self.tmpdir)
|
||||
self.assertEqual(store.last_buildroot, ("repo", "arch", None))
|
||||
|
||||
def test_scmurl(self):
|
||||
store = GitStore(self.tmpdir)
|
||||
self.assertEqual(store.scmurl, "https://example.com/packages/my-package.git")
|
||||
|
@@ -203,6 +203,12 @@ class TestStore(unittest.TestCase):
|
||||
store2 = Store(self.tmpdir)
|
||||
self.assertEqual(store2.last_buildroot, ["repo", "arch", "vm_type"])
|
||||
|
||||
self.store.last_buildroot = "repo", "arch", None
|
||||
self.fileEquals("_last_buildroot", "repo\narch\n\n")
|
||||
|
||||
store2 = Store(self.tmpdir)
|
||||
self.assertEqual(store2.last_buildroot, ["repo", "arch", None])
|
||||
|
||||
def test_meta_node(self):
|
||||
self.store.write_string(
|
||||
"_meta",
|
||||
|
Reference in New Issue
Block a user