diff options
author | gjoranv <gv@verizonmedia.com> | 2019-10-22 16:46:47 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2019-10-23 17:06:02 +0200 |
commit | eb182bfea2182d35994cbf5ca3d0ea0ec600379c (patch) | |
tree | c31ae462915bcb12a241e4578140f4612ae41e6c /bundle-plugin-test/integration-test | |
parent | 23cb74eef6fef77964d5e5e2b0ee9dd2387f8f8e (diff) |
Use project.version also for the dependency test bundle.
- The automated build process updates the project version for all
modules.
- Unfortunately, this reduces the value of one of the test cases,
because the versions of the dependent and dependency bundles are
now the same.
Diffstat (limited to 'bundle-plugin-test/integration-test')
-rw-r--r-- | bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/ExportPackageVersionTest.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/ExportPackageVersionTest.java b/bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/ExportPackageVersionTest.java index 46f8dd61576..66f36e32f39 100644 --- a/bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/ExportPackageVersionTest.java +++ b/bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/ExportPackageVersionTest.java @@ -22,12 +22,15 @@ import static org.junit.Assert.assertThat; public class ExportPackageVersionTest { private static Attributes mainAttributes; + private static String bundleVersion; @BeforeClass public static void setup() { try { File componentJar = findBundleJar("artifact-version-for-exports"); mainAttributes = new JarFile(componentJar).getManifest().getMainAttributes(); + bundleVersion = mainAttributes.getValue("Bundle-Version"); + } catch (IOException e) { throw new RuntimeException(e); } @@ -36,7 +39,6 @@ public class ExportPackageVersionTest { @Test public void artifact_version_without_qualifier_is_used_as_export_version() { // Bundle-Version is artifact version without qualifier - String bundleVersion = mainAttributes.getValue("Bundle-Version"); String expectedExport = "ai.vespa.noversion;version=" + bundleVersion; String exportPackage = mainAttributes.getValue("Export-Package"); @@ -55,8 +57,10 @@ public class ExportPackageVersionTest { @Test public void artifact_version_of_dependency_is_used_as_export_version_for_package_in_compile_scoped_dependency() { String exportPackage = mainAttributes.getValue("Export-Package"); - // Verify against the artifact version from the test bundle's pom. - assertThat(exportPackage, containsString("ai.vespa.noversion_dep;version=3.2.1")); + + // TODO: This test should have checked for a fixed version of the dependency bundle, different than the main bundle version. + // See comment in the dependency bundle's pom.xml for why this is not the case. + assertThat(exportPackage, containsString("ai.vespa.noversion_dep;version=" + bundleVersion)); } @Test |