Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2009-04-02 19:47:46 +0000
committerJohn Arthorne2009-04-02 19:47:46 +0000
commitc32e4891f017aac6da8616658d9b6d18bed41467 (patch)
treee486b1f93589c8258a3ea24e72dfe6ec14addbc0 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact
parent770138f6ea9b90312cddd112a2d71ef7e1c82d88 (diff)
downloadrt.equinox.p2-c32e4891f017aac6da8616658d9b6d18bed41467.tar.gz
rt.equinox.p2-c32e4891f017aac6da8616658d9b6d18bed41467.tar.xz
rt.equinox.p2-c32e4891f017aac6da8616658d9b6d18bed41467.zip
Bug 268245 [repo] zipped site not included in IRepositoryManager.REPOSITORIES_LOCAL
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLArtifactRepositoryTest.java (renamed from bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLRepositoryTest.java)16
2 files changed, 10 insertions, 8 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
index 53e88f6a6..1d3f3e132 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
@@ -27,7 +27,7 @@ public class AllTests extends TestCase {
suite.addTestSuite(CompositeArtifactRepositoryTest.class);
suite.addTestSuite(CorruptedJar.class);
suite.addTestSuite(FoldersRepositoryTest.class);
- suite.addTestSuite(JarURLRepositoryTest.class);
+ suite.addTestSuite(JarURLArtifactRepositoryTest.class);
suite.addTestSuite(MD5Tests.class);
suite.addTestSuite(MirrorSelectorTest.class);
suite.addTestSuite(MirrorRequestTest.class);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLArtifactRepositoryTest.java
index 752ab7118..8de55a750 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLArtifactRepositoryTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,16 +21,16 @@ import org.eclipse.equinox.internal.provisional.p2.core.Version;
import org.eclipse.equinox.p2.tests.TestActivator;
import org.osgi.framework.ServiceReference;
-public class JarURLRepositoryTest extends TestCase {
+public class JarURLArtifactRepositoryTest extends TestCase {
private ServiceReference managerRef;
private IArtifactRepositoryManager manager;
- public JarURLRepositoryTest(String name) {
+ public JarURLArtifactRepositoryTest(String name) {
super(name);
}
- public JarURLRepositoryTest() {
+ public JarURLArtifactRepositoryTest() {
super("");
}
@@ -46,13 +46,15 @@ public class JarURLRepositoryTest extends TestCase {
public void testJarURLRepository() throws ProvisionException, URISyntaxException {
URL engineJar = TestActivator.getContext().getBundle().getEntry("/testData/enginerepo.jar");
- URL jarRepoURL = null;
+ URI jarRepoLocation = null;
try {
- jarRepoURL = new URL("jar:" + engineJar.toString() + "!/testData/enginerepo/artifacts.xml");
+ jarRepoLocation = URIUtil.toURI(new URL("jar:" + engineJar.toString() + "!/testData/enginerepo/artifacts.xml"));
+ } catch (URISyntaxException e) {
+ fail(e.getMessage());
} catch (MalformedURLException e) {
fail(e.getMessage());
}
- IArtifactRepository repo = manager.loadRepository(URIUtil.toURI(jarRepoURL), null);
+ IArtifactRepository repo = manager.loadRepository(jarRepoLocation, null);
assertTrue(repo.contains(new ArtifactKey("osgi.bundle", "testdata", new Version("1.0.0.1"))));
}
}

Back to the top