use of org.eclipse.reddeer.eclipse.condition.ConsoleHasNoChange in project linuxtools by eclipse.
the class LinkContainersTest method runUhttpServer.
public void runUhttpServer(String imageName, String containerName) {
DockerImagesTab imagesTab = openDockerImagesTab();
imagesTab.runImage(imageName);
ImageRunSelectionPage firstPage = openImageRunSelectionPage(containerName, false, imagesTab);
firstPage.setContainerName(containerName);
firstPage.setPublishAllExposedPorts(false);
firstPage.finish();
if (mockitoIsUsed()) {
mockServerContainer();
new WaitUntil(new ContainerIsDeployedCondition(containerName, getConnection()));
} else {
new WaitWhile(new JobIsRunning());
new WaitWhile(new ConsoleHasNoChange());
}
}
use of org.eclipse.reddeer.eclipse.condition.ConsoleHasNoChange in project linuxtools by eclipse.
the class VolumeMountTest method testVolumeMount.
@Test
public void testVolumeMount() throws IOException {
DockerImagesTab imagesTab = openDockerImagesTab();
imagesTab.runImage(IMAGE_UHTTPD + ":" + IMAGE_TAG_LATEST);
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(imagesTab);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.setPublishAllExposedPorts(true);
firstPage.next();
ImageRunResourceVolumesVariablesPage secondPage = new ImageRunResourceVolumesVariablesPage(firstPage);
String volumePath = (new File(VOLUME_PATH)).getCanonicalPath();
secondPage.addDataVolumeToHost(CONTAINER_PATH, volumePath);
secondPage.finish();
new WaitWhile(new JobIsRunning());
if (!mockitoIsUsed()) {
new WaitWhile(new ConsoleHasNoChange());
} else {
runServer();
new WaitUntil(new ContainerIsDeployedCondition(CONTAINER_NAME, getConnection()));
}
String indexPage = getIndexPageContent();
String indexPageResource = getResourceAsString(INDEX_PAGE_PATH);
assertEquals(INDEX_PAGE_PATH + " wasnt mounted/displayed properly.", indexPage, indexPageResource);
}
use of org.eclipse.reddeer.eclipse.condition.ConsoleHasNoChange in project linuxtools by eclipse.
the class ComposeTest method runDockerCompose.
private void runDockerCompose(String project, String projectFile) {
PackageExplorerPart pe = new PackageExplorerPart();
pe.open();
pe.getProject(project).getProjectItem(projectFile).select();
@SuppressWarnings("unchecked") ContextMenuItem contextMenu = new ContextMenuItem(new WithTextMatcher("Run As"), new RegexMatcher(".*Docker Compose"));
contextMenu.select();
new OkButton().click();
try {
new DefaultShell("Docker Compose");
new PushButton("Apply and Close").click();
fail("Docker Compose has not been found! Is it installed and the path is correct?");
} catch (CoreLayerException ex) {
}
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
new WaitWhile(new ConsoleHasNoChange());
}
use of org.eclipse.reddeer.eclipse.condition.ConsoleHasNoChange in project jbosstools-openshift by jbosstools.
the class PublishChangesTest method changeProjectAndVerifyAutoPublish.
private void changeProjectAndVerifyAutoPublish() {
ProjectExplorer projectExplorer = new ProjectExplorer();
projectExplorer.open();
projectExplorer.getProject(PROJECT_NAME).select();
ProjectItem projectItem = projectExplorer.getProject(PROJECT_NAME).getProjectItem("Java Resources", "src/main/java", "org.jboss.as.quickstarts.helloworld", "HelloService.java");
projectItem.select();
projectItem.open();
TextEditor textEditor = new TextEditor("HelloService.java");
textEditor.setText(PUBLISHED_CODE);
textEditor.close(true);
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
new WaitUntil(new ConsoleHasNoChange(), TimePeriod.VERY_LONG);
assertTrue("Local changes performed to project have not been autopublished, or at least rsync " + "output in console view does not contain information about sending incremental list of changes," + "specifically with changed class " + changedClass, new ConsoleView().getConsoleText().contains(changedClass));
}
use of org.eclipse.reddeer.eclipse.condition.ConsoleHasNoChange in project jbosstools-openshift by jbosstools.
the class CDKServerAdapterAbstractTest method collectConsoleOutput.
/**
* Prints out console output via logger and returns console content
*
* @param log reference to logger
* @param onFail if true then error log method is used, debug otherwise
* @return returns console output
*/
public String collectConsoleOutput(Logger log, boolean onFail) {
String consoleOutput = "Console is empty...";
ConsoleView view = new ConsoleView();
view.open();
if (view.getConsoleText() != null) {
new WaitWhile(new ConsoleHasNoChange(), TimePeriod.DEFAULT, false);
consoleOutput = view.getConsoleLabel() + "\n\r" + view.getConsoleText();
if (onFail) {
log.info("Loggin console, called from test failure");
log.error(consoleOutput);
} else {
log.info("Logging console for debugging purposes");
log.debug(consoleOutput);
}
}
return consoleOutput;
}
Aggregations