| |
@@ -25,11 +25,11 @@
|
| |
def tearDown(self):
|
| |
shutil.rmtree(self.compose_dir)
|
| |
|
| |
- def _write_compose(self, is_layered=False):
|
| |
+ def _write_compose(self, is_layered=False, base_product_type="ga"):
|
| |
if is_layered:
|
| |
self.compose.info.release.is_layered = True
|
| |
self.compose.info.base_product.name = 'Base Product'
|
| |
- self.compose.info.base_product.type = 'ga'
|
| |
+ self.compose.info.base_product.type = base_product_type
|
| |
self.compose.info.base_product.short = 'BP'
|
| |
self.compose.info.base_product.version = '15'
|
| |
|
| |
@@ -51,6 +51,14 @@
|
| |
self.assertEqual(os.readlink(os.path.join(self.compose_dir, 'latest-DP-1-BP-15')),
|
| |
'DP-1.0-20160315.t.1')
|
| |
|
| |
+ def test_layered_non_ga_base(self):
|
| |
+ path = self._write_compose(is_layered=True, base_product_type="eus")
|
| |
+ symlink.create_latest_link(path)
|
| |
+ self.assertEqual(
|
| |
+ os.readlink(os.path.join(self.compose_dir, "latest-DP-1-BP-15-eus")),
|
| |
+ "DP-1.0-20160315.t.1"
|
| |
+ )
|
| |
+
|
| |
def test_with_minor_version(self):
|
| |
path = self._write_compose()
|
| |
with self.assertWarns(DeprecationWarning):
|
| |
The same layered product can be built for multiple versions of base product. We don't want colliding symlinks. For backwards compatibility the type is only added when it's not GA. This way it's also similar to how release IDs are generated in productmd.