[jbosstools-commits] JBoss Tools SVN: r39335 - in trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test: src/org/jboss/tools/openshift/ui/bot/test and 1 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed Mar 7 08:50:57 EST 2012


Author: sbunciak
Date: 2012-03-07 08:50:56 -0500 (Wed, 07 Mar 2012)
New Revision: 39335

Added:
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RepublishAppASS7.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java
Removed:
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeysManagment.java
Modified:
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/resources/openshift.ui.bot.test.properties
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DeleteAppAS7.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DestroyDomain.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/EmbeddCartrides.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RenameDomain.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java
   trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/TestProperties.java
Log:
Bot tests for JBoss Tools 3.3.0.Beta1 OpenShift UI 

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/resources/openshift.ui.bot.test.properties
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/resources/openshift.ui.bot.test.properties	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/resources/openshift.ui.bot.test.properties	2012-03-07 13:50:56 UTC (rev 39335)
@@ -1,9 +1,8 @@
 openshift.user.name=sbunciak
 openshift.user.pwd=rhtest123
 openshift.jbossapp.name=jbossapp
-openshift.jbossapp.cartridges=mysql-5.1;jenkins-client-1.4
+openshift.jbossapp.cartridges=mysql;cron
 openshift.user.wrongpwd=rhtest
 openshift.domain=rhtestdomain
 openshift.domain.new=rhtest
-openshift.ssh.passphrase=uvegel4ROV?
-createDomain=true
+openshift.ssh.passphrase=dXZlZ2VsNFJPVj8\=

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -1,7 +1,9 @@
 package org.jboss.tools.openshift.ui.bot.test;
 
 import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.jboss.tools.openshift.ui.bot.util.OpenShiftUI;
 import org.jboss.tools.openshift.ui.bot.util.TestProperties;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
 import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -9,26 +11,37 @@
 
 public class CreateAppAS7 extends SWTTestExt {
 
-    @Test
-    public void createApplication() {
-        bot.button(IDELabel.Menu.NEW).click();
+	@Test
+	public void canCreateApplication() {
 
-        SWTBotText appNameText = bot.text(0);
+		SWTBotText appNameText = bot.textInGroup("New application", 0);
+		bot.waitUntil(Conditions.widgetIsEnabled(appNameText));
+		
+		assertTrue("App name should be empty!", appNameText.getText()
+				.equals(""));
 
-        assertTrue("App name should be empty!", appNameText.getText()
-                .equals(""));
+		appNameText.setText(TestProperties
+				.getProperty("openshift.jbossapp.name"));
+		
+		SWTBotCombo appTypeCombo = bot.comboBoxInGroup("New application");
+		bot.waitUntil(Conditions.widgetIsEnabled(appNameText));
+		appTypeCombo.setSelection(OpenShiftUI.AppType.JBOSS);
+		
+		bot.button(IDELabel.Button.NEXT).click();
 
-        appNameText.setText(TestProperties
-                .getProperty("openshift.jbossapp.name"));
+		bot.waitUntil(Conditions.widgetIsEnabled(bot
+				.button(IDELabel.Button.FINISH)));
+		bot.button(IDELabel.Button.FINISH).click();
 
-        bot.comboBox(0).setSelection("jbossas-7.0");
+		bot.waitForShell("Information", 500);
+		bot.text(0).setText(TestProperties.getPassphrase());
+		bot.button(IDELabel.Button.OK).click();
 
-        bot.button(IDELabel.Button.FINISH).click();
+		bot.waitUntil(Conditions.shellCloses(bot.activeShell()), TIME_20S);
+		
+		assertNotNull("OpenShift Server runtime is not in the Servers View!",
+				servers.findServerByName(servers.show().bot().tree(),
+						TestProperties.getProperty("openshift.jbossapp.name")));
+	}
 
-        bot.waitUntil(Conditions.shellCloses(bot.activeShell()));
-
-        assertTrue(bot.tableInGroup("Available Applications").containsItem(
-                TestProperties.getProperty("openshift.jbossapp.name")));
-    }
-
 }

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -1,30 +1,49 @@
 package org.jboss.tools.openshift.ui.bot.test;
 
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
 import org.eclipse.swtbot.swt.finder.waits.Conditions;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.hamcrest.Matcher;
 import org.jboss.tools.openshift.ui.bot.util.TestProperties;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
 import org.junit.Test;
 
+/**
+ * Domain creation consists of creating the SSH key pair, storing user password
+ * in the secure storage and creating the domain itself.
+ * 
+ * @author sbunciak
+ * 
+ */
 public class CreateDomain extends SWTTestExt {
 
-    @Test
-    public void domainCreate() {
+	@Test
+	public void canCreateDomain() throws InterruptedException {
 
-        // create domain only if explicit configured
-        if (Boolean.parseBoolean(TestProperties.getProperty("createDomain"))) {
+			SWTBotText domainText = bot.text(0);
+			
+			assertTrue("Domain should not be set at this stage!", domainText
+					.getText().equals(""));
 
-            SWTBotText domainText = bot.textInGroup("Domain", 0);
+			domainText.setText(TestProperties.getProperty("openshift.domain"));
+			bot.button(IDELabel.Button.FINISH).click();
 
-            bot.waitUntil(Conditions.widgetIsEnabled(domainText));
+			bot.waitUntil(new NonSystemJobRunsCondition());
 
-            assertTrue("Domain should not be set at this stage!", domainText
-                    .getText().equals(""));
+			bot.waitForShell("New OpenShift Express Application", 100);
+			
+			@SuppressWarnings("unchecked")
+			Matcher<Widget> matcher = WidgetMatcherFactory.allOf(
+					WidgetMatcherFactory.widgetOfType(Shell.class),
+					WidgetMatcherFactory.withText("New OpenShift Express Application"));
 
-            domainText.setText(TestProperties.getProperty("openshift.domain"));
+			bot.waitUntilWidgetAppears(Conditions.waitForWidget(matcher));
+			
+			bot.waitUntil(new NonSystemJobRunsCondition());
+	}
 
-            bot.button("Create").click();
-        }
-    }
-
 }

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DeleteAppAS7.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DeleteAppAS7.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DeleteAppAS7.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -1,108 +1,105 @@
 package org.jboss.tools.openshift.ui.bot.test;
 
-import java.io.File;
-import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
 import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.swt.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.openshift.ui.bot.util.OpenShiftUI;
 import org.jboss.tools.openshift.ui.bot.util.TestProperties;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
 import org.jboss.tools.ui.bot.ext.types.IDELabel;
 import org.junit.Test;
 
 public class DeleteAppAS7 extends SWTTestExt {
-    @Test
-    public void deleteApplication() {
-        SWTBot wiz = open.newObject(ActionItem.NewObject.create("OpenShift",
-                "OpenShift Express Application"));
-        wiz.text(0).setText(TestProperties.getProperty("openshift.user.name"));
-        wiz.text(1).setText(TestProperties.getProperty("openshift.user.pwd"));
-        wiz.button(IDELabel.Button.NEXT).click();
-        
-        SWTBotText domainText = bot.textInGroup("Domain", 0);
-        bot.waitUntil(Conditions.widgetIsEnabled(domainText));
-        
-        SWTBotTable appTable = bot.tableInGroup("Available Applications");
+	@Test
+	public void canDeleteApplication() {
+		projectExplorer.show();
+		projectExplorer.bot().tree(0).contextMenu("Delete").click();
 
-        appTable.select(TestProperties.getProperty("openshift.jbossapp.name"));
+		bot.waitForShell("Delete Resources");
+		bot.checkBox().select();
+		bot.button(IDELabel.Button.OK).click();
 
-        bot.buttonInGroup(IDELabel.Button.DELETE, "Available Applications")
-                .click();
+		assertFalse("The project still exists!",
+				projectExplorer.existsResource(TestProperties
+						.getProperty("openshift.jbossapp.name")));
 
-        bot.waitUntilWidgetAppears(Conditions
-                .waitForWidget(WidgetMatcherFactory
-                        .withLabel("You're up to delete all data within an application. "
-                                + "The data may not be recovered. Are you sure that you want to delete application "+TestProperties.getProperty("openshift.jbossapp.name")+"?")));
+		SWTBotView openshiftConsole = open.viewOpen(OpenShiftUI.Console.iView);
 
-        bot.button(IDELabel.Button.YES).click();
+		SWTBot consoleBot = openshiftConsole.bot();
 
-        bot.waitUntil(Conditions.widgetIsEnabled(appTable));
+		SWTBotTreeItem account = consoleBot.tree()
+				.expandNode(TestProperties.getProperty("openshift.user.name"))
+				.doubleClick();
 
-        assertFalse(appTable.containsItem(TestProperties
-                .getProperty("openshift.jbossapp.name")));
+		account.getNode(0).contextMenu("Delete Application").click();
 
-        deleteJenkins();
-        
-        deleteLocalGitRepo();
-    }
+		bot.waitForShell("Application deletion");
 
-    /*
-     * Since the JBoss tooling doesn't remove app repos, we need to delete it
-     * manually
-     */
-    private void deleteLocalGitRepo() {
+		bot.button(IDELabel.Button.OK).click();
+// TODO !!!
+		bot.waitWhile(new ICondition() {
 
-        String userHome = System.getProperty("user.home");
-        String defaultGitLocation = userHome + "\\git\\"
-                + TestProperties.getProperty("openshift.jbossapp.name");
+			private boolean deletionInvoked = false;
 
-        log.info("Removing " + defaultGitLocation);
+			@Override
+			public boolean test() throws Exception {
 
-        File gitDir = new File(defaultGitLocation);
-        if (gitDir.exists() && gitDir.isDirectory()) {
-            try {
-                doDelete(gitDir);
-            } catch (IOException e) {
-                log.error("Exception when trying to delete git repo!", e);
-            }
-        }
+				if (deletionInvoked && getJobs().size() == 0) {
+					return false;
+				} else {
+					return true;
+				}
 
-    }
+			}
 
-    private void doDelete(File path) throws IOException {
-        if (path.isDirectory()) {
-            for (File child : path.listFiles()) {
-                doDelete(child);
-            }
-        }
-        if (!path.delete()) {
-            throw new IOException("Could not delete " + path);
-        }
-    }
+			@Override
+			public void init(SWTBot bot) {
+				// Keep empty
+			}
 
-    private void deleteJenkins() {
-        SWTBotTable appTable = bot.tableInGroup("Available Applications");
+			@Override
+			public String getFailureMessage() {
+				return "Deletion was not invoked in timeout.";
+			}
 
-        if (appTable.containsItem("jenkins")) {
-            appTable.select("jenkins");
+			private List<Job> getJobs() {
+				List<Job> jobs = new ArrayList<Job>();
+				for (Job job : Job.getJobManager().find(null)) {
+					if (Job.SLEEPING != job.getState()) {
+						jobs.add(job);
 
-            bot.buttonInGroup(IDELabel.Button.DELETE, "Available Applications")
-                    .click();
+						System.out.println("Job: " + job.getName());
 
-            bot.waitUntilWidgetAppears(Conditions
-                    .waitForWidget(WidgetMatcherFactory
-                            .withLabel("You're up to delete all data within an application. "
-                                    + "The data may not be recovered. Are you sure that you want to delete application jbossapp?")));
+						if (job.getName().contains("OpenShift")) {
+							System.out
+									.println("!!!!!!!!!!!FOUND ONE!!!!!!!!!!!!!");
+							deletionInvoked = true;
+						}
 
-            bot.button(IDELabel.Button.YES).click();
+					}
+				}
+				return jobs;
+			}
+		}, TIME_60S, TIME_1S);
 
-            bot.waitUntil(Conditions.widgetIsEnabled(appTable));
+		/*
+		 * TODO
+		 * 
+		 * // delete jenkins if present if (account.getNode("jenkins") != null)
+		 * { account.getNode("jenkins").contextMenu("Delete Application");
+		 * 
+		 * bot.waitForShell("Application deletion");
+		 * bot.button(IDELabel.Button.OK).click();
+		 * 
+		 * bot.waitUntil(new NonSystemJobRunsCondition()); }
+		 */
+		assertTrue("Application still present in the OpenShift Console view!",
+				account.getItems().length == 0);
 
-            assertFalse(appTable.containsItem("jenkins"));
-        }
-    }
+	}
 }

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DestroyDomain.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DestroyDomain.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DestroyDomain.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -7,18 +7,21 @@
 
 public class DestroyDomain extends SWTTestExt {
 
-    /*
-     * Since there is no way how to destroy a domain from JBoss Tools, we need
-     * to use OpenShift REST API to clean the account
-     */
-    @Test
-    public void testDestroyDomain() {
+	/*
+	 * Since there is no way how to destroy a domain from JBoss Tools, we need
+	 * to use OpenShift REST API to clean the account
+	 */
+	@Test
+	public void canDestroyDomain() {
 
-        int resp_code = DomainDestroyer.destroyDomain(
-                TestProperties.getProperty("openshift.domain.new"),
-                TestProperties.getProperty("openshift.user.name"),
-                TestProperties.getProperty("openshift.user.pwd"));
+		// destroy domain
+		int resp_code = DomainDestroyer.destroyDomain(
+				TestProperties.getProperty("openshift.domain.new"),
+				TestProperties.getProperty("openshift.user.name"),
+				TestProperties.getProperty("openshift.user.pwd"));
 
-        assertTrue("Trying to destroy domain: HTTP Response code is not 200.", resp_code == 200);
-    }
+		assertTrue("Trying to destroy domain: HTTP Response code is not 200.",
+				resp_code == 200);
+
+	}
 }

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/EmbeddCartrides.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/EmbeddCartrides.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/EmbeddCartrides.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -2,57 +2,82 @@
 
 import java.util.StringTokenizer;
 
-import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.openshift.ui.bot.util.OpenShiftUI;
 import org.jboss.tools.openshift.ui.bot.util.TestProperties;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
 import org.jboss.tools.ui.bot.ext.types.IDELabel;
 import org.junit.Test;
 
 public class EmbeddCartrides extends SWTTestExt {
 
-    @Test
-    public void embeddCartriges() {
+	@Test
+	public void canEmbeddCartriges() {
 
-        //TODO: be sure to have app selected
-        
-        bot.buttonInGroup("Edit", "Available Applications").click();
+		SWTBotView openshiftConsole = open.viewOpen(OpenShiftUI.Console.iView);
 
-        // TODO: Doesn't work
-        bot.waitUntilWidgetAppears(Conditions
-                .waitForWidget(WidgetMatcherFactory
-                        .withText("Embeddable Cartridges")));
+		SWTBotTreeItem account = openshiftConsole.bot().tree()
+				.expandNode(TestProperties.getProperty("openshift.user.name"))
+				.doubleClick();
 
-        StringTokenizer tokenizer = new StringTokenizer(
-                TestProperties.getProperty("openshift.jbossapp.cartridges"),
-                ";");
+		account.getNode(0).contextMenu("Edit Embeddable Cartridges").click();
 
-        SWTBotTable cartridgeTable = bot.tableInGroup("Embeddable Cartridges",
-                0);
+		StringTokenizer tokenizer = new StringTokenizer(
+				TestProperties.getProperty("openshift.jbossapp.cartridges"),
+				";");
 
-        while (tokenizer.hasMoreTokens()) {
-            String cartridge = tokenizer.nextToken();
+		bot.waitForShell("");
+		
+		SWTBotTable cartridgeTable = bot.tableInGroup("Embeddable Cartridges");
 
-            cartridgeTable.getTableItem(cartridge).click();
+		selectCartridges(tokenizer, cartridgeTable);
 
-            if (cartridge.contains("jenkins")) {
-                bot.text(0).setText("jenkins");
-                bot.button(IDELabel.Button.OK).click();
-                bot.waitUntilWidgetAppears(Conditions
-                        .waitForWidget(WidgetMatcherFactory
-                                .withLabel(IDELabel.Button.OK)));
-                bot.button(IDELabel.Button.OK).click();
-            }
+		bot.button(IDELabel.Button.FINISH).click();
 
-            bot.button(IDELabel.Button.FINISH).click();
+		bot.waitForShell("Embedded Cartridges");
+		bot.button(IDELabel.Button.OK).click();
+	}
 
-            bot.waitUntilWidgetAppears(Conditions
-                    .waitForWidget(WidgetMatcherFactory
-                            .withLabel(IDELabel.Button.OK)));
-            bot.button(IDELabel.Button.OK).click();
-        }
+	private void selectCartridges(StringTokenizer tokenizer,
+			SWTBotTable cartridgeTable) {
+		
+		while (tokenizer.hasMoreTokens()) {
 
-    }
+			String cartridge = tokenizer.nextToken();
+			System.out.println(cartridge);
+			if (cartridge.equals("jenkins")) {
+				cartridgeTable.getTableItem(OpenShiftUI.Cartridge.JENKINS).toggleCheck();
+				bot.waitForShell("New Jenkins application");
+				bot.text(0).setText("jenkins");
+				bot.button(IDELabel.Button.OK).click();
+				//bot.waitUntil(condition, timeout)
+				bot.waitUntil(new NonSystemJobRunsCondition(), 200);
+			}
+			if (cartridge.equals("mysql")) {
+				cartridgeTable.getTableItem(OpenShiftUI.Cartridge.MYSQL).toggleCheck();
+			}
+			if (cartridge.equals("phpmyadmin")) {
+				cartridgeTable.getTableItem(OpenShiftUI.Cartridge.PHPMYADMIN).toggleCheck();
+			}
+			if (cartridge.equals("cron")) {
+				cartridgeTable.getTableItem(OpenShiftUI.Cartridge.CRON).toggleCheck();
+			}
+			if (cartridge.equals("postgresql")) {
+				cartridgeTable.getTableItem(OpenShiftUI.Cartridge.POSTGRESQL).toggleCheck();
+			}
+			if (cartridge.equals("mongodb")) {
+				cartridgeTable.getTableItem(OpenShiftUI.Cartridge.MONGODB).toggleCheck();
+			}
+			if (cartridge.equals("rockmongo")) {
+				cartridgeTable.getTableItem(OpenShiftUI.Cartridge.ROCKMONGO).toggleCheck();
+			}
+			if (cartridge.equals("metrics")) {
+				cartridgeTable.getTableItem(OpenShiftUI.Cartridge.METRICS).toggleCheck();
+			}
+		}
+	}
 
 }

Deleted: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -1,63 +0,0 @@
-package org.jboss.tools.openshift.ui.bot.test;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
-import org.jboss.tools.openshift.ui.bot.util.TestProperties;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.junit.Test;
-
-public class ImportRepublishAppASS7 extends SWTTestExt {
-
-    private void finishWizardAndImportApp() {
-
-        bot.tableInGroup("Available Applications").select(
-                TestProperties.getProperty("openshift.jbossapp.name"));
-
-        bot.button(IDELabel.Button.NEXT).click();
-
-        SWTBotButton finishButton = bot.button(IDELabel.Button.FINISH);
-
-        bot.waitUntil(Conditions.widgetIsEnabled(finishButton));
-
-        finishButton.click();
-
-        // TODO: wait for new shell
-        bot.text(0).setText(TestProperties
-                .getProperty("openshift.ssh.passphrase"));
-        
-        bot.waitUntil(Conditions.shellCloses(bot.activeShell()));
-
-        assertTrue("App is not in the Package Explorer!",
-                packageExplorer.existsResource(TestProperties
-                        .getProperty("openshift.jbossapp.name")));
-    }
-
-    @Test
-    public void adapterIsCreated() {
-        finishWizardAndImportApp();
-
-        assertNotNull("App runtime not in the Servers View!",
-                servers.findServerByName(servers.show().bot().tree(),
-                        TestProperties.getProperty("openshift.jbossapp.name")));
-    }
-
-    private void modifyApp() {
-        SWTBot wiz = open.newObject(ActionItem.NewObject.WebHTMLPage.LABEL);
-        wiz.text(1).setText("Test.html");
-        wiz.button(IDELabel.Button.FINISH);
-    }
-
-    @Test
-    public void republishApp() {
-        modifyApp();
-
-        servers.findServerByName(servers.show().bot().tree(),
-                TestProperties.getProperty("openshift.jbossapp.name"))
-                .select("Jon, Doe").contextMenu("Publish").click();
-
-    }
-
-}

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -16,6 +16,8 @@
 
 /**
  * <b>OpenShift SWTBot TestSuite</b>
+ * <br>
+ * This bot test will try to demonstrate a new OpenShift Express Application and domain life cycle. 
  * 
  * <br>
  * TestSuite covers following test cases :
@@ -36,18 +38,20 @@
  */
 @SuiteClasses({
 
-CredentialsValidation.class, 
+ValidateCredentials.class, 
+SSHKeyManagement.class,
 CreateDomain.class,
-SSHKeysManagment.class,
+CreateAppAS7.class,
+EmbeddCartrides.class,
+RepublishAppASS7.class,
 RenameDomain.class,
-CreateAppAS7.class, 
-EmbeddCartrides.class, 
-ImportRepublishAppASS7.class,
 DeleteAppAS7.class, 
 DestroyDomain.class
 
 })
 @RunWith(RequirementAwareSuite.class)
 public class OpenShiftAllBotTests {
-    // TODO: test republishing with selenium
+	/**
+	 * Wrapper Suite class
+	 */
 }

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RenameDomain.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RenameDomain.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RenameDomain.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -1,30 +1,54 @@
 package org.jboss.tools.openshift.ui.bot.test;
 
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
 import org.eclipse.swtbot.swt.finder.waits.Conditions;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.jboss.tools.openshift.ui.bot.util.OpenShiftUI;
 import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
 import org.junit.Test;
 
-public class RenameDomain extends SWTBotTestCase {
+public class RenameDomain extends SWTTestExt {
 
-    @Test
-    public void domainRename() {
+	@Test
+	public void canRenameDomain() {
 
-        SWTBotText domainText = bot.textInGroup("Domain", 0);
+		SWTBotView openshiftConsole = open.viewOpen(OpenShiftUI.Console.iView);
 
-        bot.waitUntil(Conditions.widgetIsEnabled(domainText));
+		openshiftConsole.bot().tree()
+				.getTreeItem(TestProperties.getProperty("openshift.user.name"))
+				.contextMenu("Create or Edit Domain").click();
 
-        assertTrue(
-                "Domain should be set correctly at this stage!",
-                domainText.getText().equals(
-                        TestProperties.getProperty("openshift.domain")));
+		bot.waitForShell("");
+		
+		SWTBotText domainText = bot.text(0);
 
-        domainText.setText(TestProperties.getProperty("openshift.domain.new"));
+		assertTrue(
+				"Domain should be set correctly at this stage!",
+				domainText.getText().equals(
+						TestProperties.getProperty("openshift.domain")));
 
-        bot.button("Rename").click();
+		domainText.setText(TestProperties.getProperty("openshift.domain.new"));
 
-        bot.waitUntil(Conditions.widgetIsEnabled(domainText));
-    }
+		bot.button(IDELabel.Button.FINISH).click();
+		bot.waitUntil(Conditions.shellCloses(bot.activeShell()), TIME_60S);
+		
+		HttpClient client = new HttpClient();
+		GetMethod method = new GetMethod("https://"
+				+ TestProperties.getProperty("openshift.jbossapp.name") + "-"
+				+ TestProperties.getProperty("openshift.domain.new")
+				+ ".rhcloud.com/Test.html");
+		
+		try {
+			assertTrue(client.executeMethod(method) == 200);
+		} catch (Exception e) {
+			log.error("File has not been published to the server!", e);
+		} finally {
+			method.releaseConnection();
+		}
+	}
 
 }

Copied: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RepublishAppASS7.java (from rev 38080, trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java)
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RepublishAppASS7.java	                        (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RepublishAppASS7.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -0,0 +1,59 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+public class RepublishAppASS7 extends SWTTestExt {
+
+	@Test
+	public void canModifyAndRepublishApp() {
+		SWTBot wiz = open.newObject(ActionItem.NewObject.WebHTMLPage.LABEL);
+		wiz.text(0).setText(
+				TestProperties.getProperty("openshift.jbossapp.name")
+						+ "/src/main/webapp");
+		wiz.text(1).setText("Test.html");
+
+		wiz.button(IDELabel.Button.FINISH).click();
+
+		projectExplorer.show();
+		projectExplorer.bot().tree().select(0);
+		ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(),
+				"Team", "Commit and Push...");
+
+		bot.waitForShell("Commit Changes");
+		bot.styledText(0).setText("comment");
+		
+		bot.table().getTableItem(0).toggleCheck();
+		//bot.toolbarButtonWithTooltip("Select All").click();
+
+		bot.button("Commit").click();
+
+		bot.waitForShell("Push to Another Repository");
+		bot.button(IDELabel.Button.FINISH).click();
+
+		bot.waitForShell("Push Results: origin", 200);
+		bot.button(IDELabel.Button.OK).click();
+		
+		HttpClient client = new HttpClient();
+		GetMethod method = new GetMethod("https://"
+				+ TestProperties.getProperty("openshift.jbossapp.name") + "-"
+				+ TestProperties.getProperty("openshift.domain")
+				+ ".rhcloud.com/Test.html");
+
+		try {
+			assertTrue(client.executeMethod(method) == 200);
+		} catch (Exception e) {
+			log.error("File has not been published to the server!", e);
+		} finally {
+			method.releaseConnection();
+		}
+	}
+
+}

Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java	                        (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -0,0 +1,44 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.hamcrest.Matcher;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+public class SSHKeyManagement extends SWTTestExt {
+	
+	@Test
+	public void canCreateSSHKey() {
+
+		bot.waitForShell("", 100);
+
+		@SuppressWarnings("unchecked")
+		Matcher<Widget> matcher = WidgetMatcherFactory.allOf(
+				WidgetMatcherFactory.widgetOfType(Shell.class),
+				WidgetMatcherFactory.withText(""));
+
+		bot.waitUntilWidgetAppears(Conditions.waitForWidget(matcher));
+
+		bot.link(0).click("SSH2 Preferences");
+		bot.waitForShell(IDELabel.Shell.PREFERENCES);
+
+		//SWTBotText sshDirText = bot.text(1);
+		//sshDirText.setText(System.getProperty("user.home") + "/.ssh2");
+
+		bot.button(IDELabel.Button.OK).click();
+		bot.waitUntilWidgetAppears(Conditions.waitForWidget(matcher));
+
+		bot.button(IDELabel.Shell.NEW).click();
+		bot.waitForShell("New ssh key");
+		bot.text(0).setText(TestProperties.getPassphrase());
+		bot.button(IDELabel.Button.OK).click();
+
+		bot.waitUntilWidgetAppears(Conditions.waitForWidget(matcher));
+	}
+
+}


Property changes on: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeyManagement.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Deleted: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeysManagment.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeysManagment.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeysManagment.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -1,31 +0,0 @@
-package org.jboss.tools.openshift.ui.bot.test;
-
-import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.swt.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.junit.Test;
-
-public class SSHKeysManagment extends SWTTestExt {
-
-    @Test
-    public void addPrivateKey() {
-        
-        bot.waitUntilWidgetAppears(Conditions.waitForWidget(WidgetMatcherFactory
-                        .withLabel("SSH Public Key")));
-
-        bot.link(0).click("SSH2 Preferences");
-        //TODO: wait
-                
-        SWTBotText privateKeysText = bot.text(2); 
-        
-        privateKeysText.setText(privateKeysText.getText() + ",libra_id_rsa");
-        
-        bot.button("OK").click();
-        
-        // TODO: repeat untilClosedActiveShell - due to HTTP 500
-        
-        bot.button("Finish").click();
-    }
-    
-}

Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java	                        (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -0,0 +1,76 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import java.io.File;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
+import org.jboss.tools.openshift.ui.bot.util.OpenShiftUI;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Before;
+import org.junit.Test;
+
+ at Require(clearWorkspace = true)
+public class ValidateCredentials extends SWTTestExt {
+
+	@Before
+	public void prepareSSHPrefs() {
+		// clear dir from libra stuff
+		File sshDir = new File(System.getProperty("user.home") + "/.ssh");
+		if (sshDir.exists() && sshDir.isDirectory()
+				&& sshDir.listFiles().length > 0) {
+			for (File file : sshDir.listFiles()) {
+				if (file.getName().contains("libra"))
+					file.delete();
+			}
+		}
+
+	}
+
+	@Test
+	public void canValidateCredentials() throws InterruptedException {
+		// create new OpenShift Express Application
+		SWTBot wiz = open.newObject(OpenShiftUI.NewApplication.iNewObject);
+
+		// set wrong user credentials
+		wiz.text(0).setText(TestProperties.getProperty("openshift.user.name"));
+		wiz.text(1).setText(
+				TestProperties.getProperty("openshift.user.wrongpwd"));
+
+		SWTBotButton nextButton = wiz.button(IDELabel.Button.NEXT);
+		// try to move forward
+		nextButton.click();
+
+		// wait for credentials validation
+		bot.waitUntil(new NonSystemJobRunsCondition());
+
+		assertFalse("Next > button shouldn't be enabled to move forward.",
+				nextButton.isEnabled());
+
+		// set correct user credentials and save it to secure storage
+		wiz.text(0).setText(TestProperties.getProperty("openshift.user.name"));
+		wiz.text(1).setText(TestProperties.getProperty("openshift.user.pwd"));
+		wiz.checkBox(0).select();
+
+		// move forward
+		nextButton.click();
+
+		storePasswordThenForward();
+
+		bot.waitForShell("", 100);
+	}
+
+	/*
+	 * give the secure storage password (will use the same as user's ssh
+	 * passphrase)
+	 */
+	private void storePasswordThenForward() {
+		bot.waitForShell(IDELabel.Shell.SECURE_STORAGE);
+		bot.text(0).setText(TestProperties.getPassphrase());
+		bot.button(IDELabel.Button.OK).click();
+	}
+
+}


Property changes on: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ValidateCredentials.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -36,7 +36,7 @@
         try {
             resp_code = client.executeMethod(method);
         } catch (Exception e) {
-            System.err.println(e);
+            System.out.println(e);
         } finally {
             method.releaseConnection();
         }
@@ -47,6 +47,10 @@
      * @param args
      */
     public static void main(String[] args) {
-        destroyDomain("rhtestdomain", "sbunciak", "rhtest123");
+        if (destroyDomain("rhtest", "sbunciak", "rhtest123") == 200) {
+        	System.out.println("Domain destroyed.");
+        } else {
+        	System.out.println("Domain was not destroyed.");
+        }
     }
 }

Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java	                        (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -0,0 +1,95 @@
+package org.jboss.tools.openshift.ui.bot.util;
+
+import java.util.List;
+import java.util.Vector;
+
+import org.jboss.tools.ui.bot.ext.gen.INewObject;
+import org.jboss.tools.ui.bot.ext.gen.IView;
+
+/**
+ * 
+ * Wrapper class for OpenShift UI tooling.
+ * 
+ * @author sbunciak
+ * 
+ */
+public class OpenShiftUI {
+
+	/**
+	 * 
+	 * Class representing OpenShift Console View
+	 *
+	 */
+	public static class Console {
+
+		public static final IView iView = new IView() {
+			@Override
+			public String getName() {
+				return "OpenShift Express Console";
+			}
+
+			@Override
+			public List<String> getGroupPath() {
+				List<String> l = new Vector<String>();
+				l.add("JBoss Tools");
+				return l;
+			}
+		};
+	}
+
+	/**
+	 * 
+	 * Class representing "navigation" to new OpenShift Express Application
+	 * 
+	 */
+	public static class NewApplication {
+		public static final INewObject iNewObject = new INewObject() {
+			@Override
+			public String getName() {
+				return "OpenShift Application";
+			}
+
+			@Override
+			public List<String> getGroupPath() {
+				List<String> l = new Vector<String>();
+				l.add("OpenShift");
+				return l;
+			}
+		};
+	}
+	
+	/**
+	 * List of available application type labels
+	 * 
+	 * @author sbunciak
+	 *
+	 */
+	public static class AppType {
+		
+		public static final String JBOSS = "jbossas-7";
+		public static final String JENKINS = "jenkins-1.4";
+		public static final String PERL = "perl-5.10";
+		public static final String PHP = "php-5.3";
+		public static final String PYTHON = "python-2.6";
+		public static final String RAW = "raw-0.1";
+		public static final String RUBY = "ruby-1.8";
+	}
+	
+	/**
+	 * List of available cartridge labels
+	 * 
+	 * @author sbunciak
+	 *
+	 */
+	public static class Cartridge {
+		
+		public static final String MONGODB = "mongodb-2.0";
+		public static final String JENKINS = "jenkins-1.4";
+		public static final String CRON = "cron-1.4";
+		public static final String MYSQL = "mysql-5.1";
+		public static final String POSTGRESQL = "postgresql-8.4";
+		public static final String PHPMYADMIN = "phpmyadmin-3.4";
+		public static final String METRICS = "metrics-0.1";
+		public static final String ROCKMONGO = "rockmongo-1.1";
+	}
+}


Property changes on: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/TestProperties.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/TestProperties.java	2012-03-07 13:36:34 UTC (rev 39334)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/TestProperties.java	2012-03-07 13:50:56 UTC (rev 39335)
@@ -5,6 +5,7 @@
 import java.io.IOException;
 import java.util.Properties;
 
+import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
 
 /**
@@ -37,4 +38,10 @@
         return props.getProperty(key);
     }
 
+    public static String getPassphrase() {
+    	String passphrase = new String(new Base64().decode(TestProperties.getProperty(
+				"openshift.ssh.passphrase").getBytes()));
+    	return passphrase;
+    }
+    
 }



More information about the jbosstools-commits mailing list