Test: image re-import merges Deploy/Applications (MCL certs) and keeps the Engineering Layer
This commit is contained in:
@@ -122,6 +122,24 @@ class EngineeringLayer(unittest.TestCase):
|
|||||||
EL.restore("../../etc")
|
EL.restore("../../etc")
|
||||||
|
|
||||||
|
|
||||||
|
def test_image_reimport_keeps_payload_and_adds_certs(self):
|
||||||
|
# MCL's Deploy\Applications carries the GE CA certs the unattends
|
||||||
|
# install; re-importing it must merge, not wipe extra_engineering.
|
||||||
|
from services import deploy
|
||||||
|
self.up("payload.zip", payload_zip("3.1"))
|
||||||
|
src = tempfile.mkdtemp(dir=_T)
|
||||||
|
apps = os.path.join(src, "Applications")
|
||||||
|
os.makedirs(apps)
|
||||||
|
with open(os.path.join(apps, "GE_External_Root_CA_2_1.cer"), "wb") as f:
|
||||||
|
f.write(b"cert")
|
||||||
|
dst = os.path.join(config.SAMBA_SHARE, "gea-engineer", "Deploy")
|
||||||
|
deploy.import_deploy(src, dst, "gea-engineer")
|
||||||
|
self.assertTrue(os.path.isfile(os.path.join(dst, "Applications", "GE_External_Root_CA_2_1.cer")))
|
||||||
|
st = EL.status()
|
||||||
|
self.assertEqual(st["active"]["version"], "3.1")
|
||||||
|
self.assertTrue(st["prereqs"]["present"] and st["script"])
|
||||||
|
|
||||||
|
|
||||||
class EngineeringLayerPages(unittest.TestCase):
|
class EngineeringLayerPages(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
shutil.rmtree(config.SAMBA_SHARE, ignore_errors=True)
|
shutil.rmtree(config.SAMBA_SHARE, ignore_errors=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user