Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2012-11-15 16:09:41 +0000
committerPascal Rapicault2012-11-17 03:47:18 +0000
commitb935c7de40bf4ffc05405dc017c5c4d5ce6063b1 (patch)
treea7df4682ebe4a1936538a23b3b6ef57cc9df2cca
parent9d91c6a2e9bf3c11e2be312ee45693c5fdb3fea9 (diff)
downloadrt.equinox.p2-b935c7de40bf4ffc05405dc017c5c4d5ce6063b1.tar.gz
rt.equinox.p2-b935c7de40bf4ffc05405dc017c5c4d5ce6063b1.tar.xz
rt.equinox.p2-b935c7de40bf4ffc05405dc017c5c4d5ce6063b1.zip
Reorganize test data
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/testData/sharedPreferences/userHome/configuration/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs13
2 files changed, 11 insertions, 15 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java
index fb8b63b13..d0fc256d7 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java
@@ -48,7 +48,7 @@ public class SharedProfilePreferencesTest extends AbstractProvisioningTest {
}
protected void setUp() throws Exception {
- super.setUp();
+ //We don't call super.setUp() on purpose
Bundle p2Core = Platform.getBundle("org.eclipse.equinox.p2.core");
p2Core.stop();
@@ -58,6 +58,7 @@ public class SharedProfilePreferencesTest extends AbstractProvisioningTest {
System.setProperty("osgi.sharedConfiguration.area", new File(baseInstall, "configuration").toURI().toString());
System.setProperty("osgi.configuration.area", new File(userHome, "configuration").toURI().toString());
System.setProperty("eclipse.p2.profile", "epp.package.java");
+ System.setProperty("eclipse.p2.data.area", "@config.dir/../p2");
p2Core.start();
}
@@ -66,7 +67,7 @@ public class SharedProfilePreferencesTest extends AbstractProvisioningTest {
IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(TestActivator.getContext(), IPreferencesService.class.getName());
assertNotNull(prefService);
try {
- URI defaultLocation = URIUtil.fromString(TestActivator.getContext().getProperty("osgi.configuration.area") + "/p2/");
+ URI defaultLocation = URIUtil.makeAbsolute(URIUtil.fromString(TestActivator.getContext().getProperty("osgi.configuration.area") + "../p2/"), new URI("."));
String locationString = EncodingUtils.encodeSlashes(defaultLocation.toString());
Preferences node = prefService.getRootNode().node("/profile/shared/" + locationString + "/_SELF_/org.eclipse.equinox.p2.metadata.repository/repositories"); //$NON-NLS-1$
String[] children = node.childrenNames();
@@ -81,4 +82,12 @@ public class SharedProfilePreferencesTest extends AbstractProvisioningTest {
}
+
+// public void testCountRepoInSharedInstallThroughRepoManagerAPI() {
+// IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
+// URI[] repos = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+// assertEquals(3, repos.length);
+// }
+
+
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/testData/sharedPreferences/userHome/configuration/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/testData/sharedPreferences/userHome/configuration/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
deleted file mode 100644
index dd3534dbf..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/testData/sharedPreferences/userHome/configuration/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/enabled=true
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/isSystem=false
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/nickname=The Eclipse Project Updates
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/uri=http\://download.eclipse.org/eclipse/updates/4.2
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/enabled=true
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/isSystem=false
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/nickname=Mylyn for Eclipse Juno
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/uri=http\://download.eclipse.org/mylyn/releases/juno
-repositories/http\:__download.eclipse.org_releases_juno/enabled=true
-repositories/http\:__download.eclipse.org_releases_juno/isSystem=false
-repositories/http\:__download.eclipse.org_releases_juno/nickname=Juno
-repositories/http\:__download.eclipse.org_releases_juno/uri=http\://download.eclipse.org/releases/juno

Back to the top