Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDariusz Luksza2012-02-22 20:11:35 +0000
committerMatthias Sohn2012-02-22 20:11:35 +0000
commit99615d6bee5789c2cb3851b0c63922ac19935fdd (patch)
tree955bbed3e61742b5d9e5e183e2a1a64c9fc48456
parent6dc11c5c6c7ec4b5e33a8b3ad3cb95be7393d9f9 (diff)
downloadegit-99615d6bee5789c2cb3851b0c63922ac19935fdd.tar.gz
egit-99615d6bee5789c2cb3851b0c63922ac19935fdd.tar.xz
egit-99615d6bee5789c2cb3851b0c63922ac19935fdd.zip
Disable Secure Storage in UI clone tests
Recently UI clone tests was failing because of secure storage modal dialog asking for secure storage password. This patch disables secure storage for all UI clone tests Change-Id: If81f4487b05b46447c5e9a64b1626ea883a9ba65 Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java
index 789f144731..74080974f0 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java
@@ -13,12 +13,18 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
+import java.util.List;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.egit.ui.common.GitImportRepoWizard;
import org.eclipse.egit.ui.common.LocalRepositoryTestCase;
import org.eclipse.egit.ui.common.RepoRemoteBranchesPage;
import org.eclipse.egit.ui.common.WorkingCopyPage;
+import org.eclipse.equinox.internal.security.storage.PasswordProviderSelector;
+import org.eclipse.equinox.internal.security.storage.PasswordProviderSelector.ExtStorageModule;
+import org.eclipse.equinox.internal.security.storage.friends.IStorageConstants;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.lib.Constants;
@@ -28,6 +34,7 @@ import org.eclipse.jgit.util.FileUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
+import org.junit.BeforeClass;
public abstract class GitCloneWizardTestBase extends LocalRepositoryTestCase {
@@ -91,6 +98,18 @@ public abstract class GitCloneWizardTestBase extends LocalRepositoryTestCase {
ResourcesPlugin.getWorkspace().getRoot().getProjects().length);
}
+ @BeforeClass
+ public static void disableSecureStoragePasswordProviders() {
+ List availableModules = PasswordProviderSelector.getInstance().findAvailableModules(null);
+ StringBuffer tmp = new StringBuffer();
+ for (Object module : availableModules) {
+ ExtStorageModule storageModule = (ExtStorageModule) module;
+ tmp.append(storageModule.moduleID).append(",");
+ }
+ IEclipsePreferences node = ConfigurationScope.INSTANCE.getNode("org.eclipse.equinox.security");
+ node.put(IStorageConstants.DISABLED_PROVIDERS_KEY, tmp.toString());
+ }
+
@Before
public void setupViews() {
bot.perspectiveById("org.eclipse.jdt.ui.JavaPerspective").activate();

Back to the top