use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.
the class AbstractImageBotTest method buildImage.
protected void buildImage(String imageName, String dockerFileFolder, DockerImagesTab imageTab) {
try {
String dockerFilePath = new File(dockerFileFolder).getCanonicalPath();
getConnection();
imageTab.buildImage(imageName, dockerFilePath);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
} catch (IOException ex) {
fail("Resource file not found!");
}
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.
the class ImageTagTest method testAddRemoveTagToImage.
@Test
public void testAddRemoveTagToImage() {
DockerImagesTab imagesTab = openDockerImagesTab();
imagesTab.activate();
addTagToImage(IMAGE_NAME, IMAGE_TAG);
new WaitWhile(new JobIsRunning());
assertTrue("Image tag has not been added", imagesTab.getImageTags(IMAGE_NAME).contains(IMAGE_TAG));
removeTagFromImage(IMAGE_NAME, IMAGE_TAG);
new WaitWhile(new JobIsRunning());
assertTrue("ImageTaghasNotBeenRemoved", !imagesTab.getImageTags(IMAGE_NAME).contains(IMAGE_TAG));
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.
the class PushImageTest method pushImage.
@Test
public void pushImage() {
DockerImagesTab imagesTab = openDockerImagesTab();
buildImage(IMAGE_NAME, DOCKERFILE_FOLDER, imagesTab);
assertConsoleSuccess();
setUpRegister(REGISTRY_URL, dockerHubEmail, dockerHubUsername, dockerHubPassword);
setSecureStorage("password");
String seconds = String.valueOf(new java.util.Date().getTime());
this.imageNewTag = IMAGE_TAG + ":" + seconds;
addTagToImage(IMAGE_NAME, imageNewTag);
// new WaitUntil(new JobIsRunning(), TimePeriod.VERY_LONG);
if (!mockitoIsUsed()) {
getConnection().getImage(IMAGE_TAG, seconds).pushImage(REGISTRY_ACCOUNT, false, false);
}
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
deleteImage(IMAGE_TAG, seconds);
pullImage(IMAGE_TAG, seconds, REGISTRY_URL);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
assertTrue("Image has not been pushed/pulled!", imageIsDeployed(IMAGE_TAG));
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.
the class ComposeTest method importProject.
private void importProject(String path) {
new ShellMenu().getItem("File", "Open Projects from File System...").select();
new LabeledCombo("Import source:").setText(path);
new FinishButton().click();
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project linuxtools by eclipse.
the class PropertiesViewTest method testContainerPropertiesTab.
@Test
public void testContainerPropertiesTab() {
DockerImagesTab imagesTab = openDockerImagesTab();
imagesTab.runImage(IMAGE_NAME);
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(imagesTab);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.finish();
// new WaitWhile(new ContainerIsDeployedCondition(CONTAINER_NAME,
// getConnection()));
DockerContainersTab containerTab = new DockerContainersTab();
containerTab.activate();
containerTab.refresh();
new WaitWhile(new JobIsRunning());
if (mockitoIsUsed()) {
MockUtils.runContainer(DEFAULT_CONNECTION_NAME, IMAGE_NAME, IMAGE_TAG_LATEST, CONTAINER_NAME);
}
getConnection();
// open Properties view
PropertySheet propertiesView = new PropertySheet();
propertiesView.open();
containerTab.select(CONTAINER_NAME);
propertiesView.selectTab("Info");
}
Aggregations