Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2010-02-08 22:48:34 +0000
committerAndrew Niefer2010-02-08 22:48:34 +0000
commit000bdd1605fd64b7963e3af8d4c5fddabb77f2af (patch)
treef74b489b2c0b7530a9fe3dab8adf4274b7917698 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant
parentf64be77fe6902710ca12f44bc62b60be6f36dd1b (diff)
downloadrt.equinox.p2-000bdd1605fd64b7963e3af8d4c5fddabb77f2af.tar.gz
rt.equinox.p2-000bdd1605fd64b7963e3af8d4c5fddabb77f2af.tar.xz
rt.equinox.p2-000bdd1605fd64b7963e3af8d4c5fddabb77f2af.zip
bug 301056 - exception with empty baselinev20100208
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java22
1 files changed, 18 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java
index 23af9407f..fd244eb13 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ant;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
@@ -23,8 +21,7 @@ import org.eclipse.equinox.internal.p2.director.PermissiveSlicer;
import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.internal.repository.comparator.MD5ArtifactComparator;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.*;
import org.eclipse.equinox.p2.repository.artifact.*;
@@ -89,6 +86,23 @@ public class MirrorTaskTest extends AbstractAntProvisioningTest {
assertEquals("Different number of IUs", getIUCount(sourceRepo2), getIUCount(destinationRepo));
}
+ public void testMirrorEmptyBaseline() throws Exception {
+ File folder = getTestFolder("MirrorEmptyBaseline");
+ String baseline = "file:" + new File(folder, "base").getAbsolutePath();
+ String dest = "file:" + new File(folder, "destination").getAbsolutePath();
+ String logFile = new File(folder, "log.txt").getAbsolutePath();
+
+ AntTaskElement mirror = new AntTaskElement("p2.artifact.mirror");
+ mirror.addAttribute("source", URIUtil.toUnencodedString(sourceRepo2));
+ mirror.addAttribute("baseline", baseline);
+ mirror.addAttribute("comparatorId", "org.eclipse.equinox.p2.repository.tools.jar.comparator");
+ mirror.addAttribute("destination", dest);
+ mirror.addAttribute("log", logFile);
+ addTask(mirror);
+ runAntTask();
+ assertLogContainsLine(new File(folder, "log.txt"), "No repository found at " + URIUtil.toUnencodedString(URIUtil.fromString(baseline)));
+ }
+
/*
* Test we can mirror from a zipped repository
*/

Back to the top