use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class EditResourceLimitsTest method setUp.
@Before
public void setUp() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.open();
this.connection = explorer.getOpenShift3Connection(requiredConnection.getConnection());
this.project = connection.getProject(requiredProject.getProjectName());
this.project.expand();
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class PublishChangesTest method waitForRunningApplication.
@BeforeClass
public static void waitForRunningApplication() {
new ProjectExplorer().deleteAllProjects(true);
new WaitUntil(new OpenShiftResourceExists(Resource.BUILD, "eap-app-1", ResourceState.COMPLETE, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.getCustom(1000));
OpenShiftExplorerView openShiftExplorerView = new OpenShiftExplorerView();
OpenShiftProject project = openShiftExplorerView.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName());
new WaitUntil(new ApplicationPodIsRunning(project), TimePeriod.LONG);
cloneGitRepoAndImportProject();
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method deleteAllProjects.
public static void deleteAllProjects(Connection connection) {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.getOpenShift3Connection(connection).refresh();
new WaitWhile(new JobIsRunning());
List<OpenShiftProject> projects = explorer.getOpenShift3Connection(connection).getAllProjects();
for (OpenShiftProject project : projects) {
if (project != null) {
String projectName = project.getName();
try {
project.delete();
new WaitWhile(new OpenShiftProjectExists(projectName, connection), TimePeriod.LONG);
} catch (CoreLayerException ex) {
// project does not exist - project has been deleted but view has not been
// refreshed
explorer.getOpenShift3Connection(connection).refresh();
}
}
}
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class CreateNewConnectionTest method testCreateNewV3BasicConnection.
@Test
@RunIf(conditionClass = ConnectionCredentialsExists.class)
public void testCreateNewV3BasicConnection() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.open();
DatastoreOS3.AUTH_METHOD = AuthenticationMethod.BASIC;
explorer.openConnectionShell();
OpenShift3ConnectionWizard connectionWizard = new OpenShift3ConnectionWizard();
connectionWizard.setServer(DatastoreOS3.SERVER);
connectionWizard.switchAuthenticationSection(DatastoreOS3.AUTH_METHOD);
BasicAuthenticationSection authSection = (BasicAuthenticationSection) connectionWizard.getAuthSection();
authSection.setUsername(DatastoreOS3.USERNAME);
authSection.setPassword(DatastoreOS3.PASSWORD);
authSection.setSavePassword(false);
connectionWizard.finishAndHandleCertificate();
assertTrue("Connection does not exist in OpenShift Explorer view", explorer.connectionExists(DatastoreOS3.USERNAME));
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class CreateNewConnectionTest method testCreateNewV3OAuthConnection.
@Test
@RunIf(conditionClass = ConnectionCredentialsExists.class)
public void testCreateNewV3OAuthConnection() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.open();
DatastoreOS3.AUTH_METHOD = AuthenticationMethod.OAUTH;
explorer.openConnectionShell();
try {
explorer.connectToOpenShift(DatastoreOS3.SERVER, null, DatastoreOS3.TOKEN, false, false, AuthenticationMethod.OAUTH, true);
} catch (RedDeerException ex) {
fail("Creating an OpenShift v3 OAuth connection failed." + ex.getCause());
}
assertTrue("Connection does not exist in OpenShift Explorer view", explorer.connectionExists(DatastoreOS3.USERNAME));
}
Aggregations