use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class ResourcesTest method testResourcesExistence.
@Test
public void testResourcesExistence() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.open();
OpenShiftProject project = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(DatastoreOS3.TEST_PROJECT);
project.expand();
TreeItem projectItem = project.getTreeItem();
verifyResourceExistence(projectItem, Resource.BUILD_CONFIG);
verifyResourceExistence(projectItem, Resource.BUILD);
verifyResourceExistence(projectItem, Resource.DEPLOYMENT_CONFIG);
verifyResourceExistence(projectItem, Resource.IMAGE_STREAM);
verifyResourceExistence(projectItem, Resource.POD);
verifyResourceExistence(projectItem, Resource.ROUTE);
verifyResourceExistence(projectItem, Resource.SERVICE);
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class ServerAdapterFromResourceTest method importProject.
@BeforeClass
public static void importProject() {
explorer = new OpenShiftExplorerView();
explorer.open();
project = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(DatastoreOS3.TEST_PROJECT);
project.getServicesWithName(OpenShiftResources.NODEJS_SERVICE).get(0).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
ImportApplicationWizard appWizard = new ImportApplicationWizard();
try {
CheckBox checkBox = new CheckBox("Do not clone - use existing repository");
if (checkBox.isEnabled()) {
checkBox.toggle(true);
LOGGER.debug("Using existing project, skipping import");
}
} catch (RedDeerException ex) {
LOGGER.debug("No existing project found, importing");
}
try {
appWizard.finish();
} catch (WaitTimeoutExpiredException ex) {
// When running test in suite, it needs to be selected correct build config(in OpenShift instance could be more build configs)
appWizard.selectExistingBuildConfiguration(OpenShiftResources.NODEJS_APP_DEPLOYMENT_CONFIG);
appWizard.finish();
}
new WaitUntil(new OpenShiftResourceExists(Resource.DEPLOYMENT, OpenShiftResources.NODEJS_APP_REPLICATION_CONTROLLER, ResourceState.UNSPECIFIED, DatastoreOS3.TEST_PROJECT, connectionReq.getConnection()), TimePeriod.LONG);
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class PublishChangesTest method createServerAdapter.
private void createServerAdapter() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName()).getServicesWithName("eap-app").get(0).createServerAdapter();
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class CreateResourcesTest method refreshProject.
private void refreshProject() {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.open();
explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(testProject).refresh();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView in project jbosstools-openshift by jbosstools.
the class DeleteResourceTest method deleteResourceAndAssert.
private void deleteResourceAndAssert(Resource resource) {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
OpenShiftResource rsrc = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName()).getOpenShiftResources(resource).get(0);
String resourceName = rsrc.getName();
rsrc.delete();
try {
OpenShiftResourceExists openShiftResourceExists = new OpenShiftResourceExists(resource, resourceName, ResourceState.UNSPECIFIED, projectReq.getProjectName(), connectionReq.getConnection());
new WaitWhile(openShiftResourceExists, TimePeriod.getCustom(15));
} catch (WaitTimeoutExpiredException ex) {
fail("Route " + resource + " should be deleted at this point but it is still present.");
}
}
Aggregations