aboutsummaryrefslogtreecommitdiffstats
path: root/bundle-plugin-test/src/test/java/com/yahoo/BundleIT.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundle-plugin-test/src/test/java/com/yahoo/BundleIT.java')
-rw-r--r--bundle-plugin-test/src/test/java/com/yahoo/BundleIT.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/bundle-plugin-test/src/test/java/com/yahoo/BundleIT.java b/bundle-plugin-test/src/test/java/com/yahoo/BundleIT.java
index 38ca08ecff1..5b4fdda06f7 100644
--- a/bundle-plugin-test/src/test/java/com/yahoo/BundleIT.java
+++ b/bundle-plugin-test/src/test/java/com/yahoo/BundleIT.java
@@ -4,7 +4,6 @@ package com.yahoo;
import com.yahoo.osgi.maven.ProjectBundleClassPaths;
import com.yahoo.vespa.config.VespaVersion;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
@@ -81,9 +80,15 @@ public class BundleIT {
@Test
public void require_that_manifest_contains_inferred_imports() {
String importPackage = mainAttributes.getValue("Import-Package");
+
+ // From SimpleSearcher
assertThat(importPackage, containsString("com.yahoo.prelude.hitfield"));
- //Not available from jdisc at the moment, scope temporarily changed to compile.
- //assertThat(importPackage, containsString("org.json"));
+ assertThat(importPackage, containsString("org.json"));
+
+ // From SimpleSearcher2
+ assertThat(importPackage, containsString("com.yahoo.processing"));
+ assertThat(importPackage, containsString("com.yahoo.metrics.simple"));
+ assertThat(importPackage, containsString("com.google.inject"));
}
@Test
@@ -104,20 +109,22 @@ public class BundleIT {
}
@Test
+ // TODO: use another jar than jrt, which now pulls in a lot of dependencies that pollute the manifest of the
+ // generated bundle. (It's compile scoped in pom.xml to be added to the bundle-cp.)
public void require_that_manifest_contains_bundle_class_path() {
String bundleClassPath = mainAttributes.getValue("Bundle-ClassPath");
assertThat(bundleClassPath, containsString(".,"));
// If bundle-plugin-test is compiled in a mvn command that also built jrt,
// the jrt artifact is jrt.jar, otherwise the installed and versioned artifact
- // is used: jrt-6-SNAPSHOT.jar.
+ // is used: jrt-7-SNAPSHOT.jar.
assertThat(bundleClassPath, anyOf(
- containsString("dependencies/jrt-6-SNAPSHOT.jar"),
+ containsString("dependencies/jrt-7-SNAPSHOT.jar"),
containsString("dependencies/jrt.jar")));
}
@Test
public void require_that_component_jar_file_contains_compile_artifacts() {
- ZipEntry versionedEntry = jarFile.getEntry("dependencies/jrt-6-SNAPSHOT.jar");
+ ZipEntry versionedEntry = jarFile.getEntry("dependencies/jrt-7-SNAPSHOT.jar");
ZipEntry unversionedEntry = jarFile.getEntry("dependencies/jrt.jar");
if (versionedEntry == null) {
assertNotNull(unversionedEntry);