use of org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab 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.linuxtools.docker.reddeer.ui.DockerImagesTab in project linuxtools by eclipse.
the class MockDockerConnectionManager method configureConnectionManager.
/**
* Configures the {@link DockerConnectionManager} with the given array of
* {@link IDockerConnection} (can be mocked) and refreshes the associated
* {@link DockerExplorerView}.
*
* @param connectionStorageManager
* the {@link IDockerConnectionStorageManager} to use (can be
* mocked)
*/
public static void configureConnectionManager(final IDockerConnectionStorageManager connectionStorageManager) {
DockerConnectionManager.getInstance().setConnectionStorageManager(connectionStorageManager);
DockerConnectionManager.getInstance().reloadConnections();
DockerExplorerView de = new DockerExplorerView();
de.open();
de.refreshView();
DockerImagesTab imageTab = new DockerImagesTab();
imageTab.activate();
imageTab.refresh();
DockerContainersTab containerTab = new DockerContainersTab();
containerTab.activate();
containerTab.refresh();
}
use of org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab in project linuxtools by eclipse.
the class ComposeTest method testCompose.
@Test
public void testCompose() {
// Set up Docker Compose location
PreferenceDialog dialog = new WorkbenchPreferenceDialog();
DockerComposePreferencePage composePreference = new DockerComposePreferencePage(dialog);
dialog.open();
dialog.select(composePreference);
composePreference.setPathToDockerCompose(this.dockerComposePath);
composePreference.apply();
new PushButton("Apply and Close").click();
// Build Image
DockerImagesTab imagesTab = openDockerImagesTab();
buildImage(IMAGE_NAME, PATH_TEST_COMPOSE, imagesTab);
assertConsoleSuccess();
// Import resource folder
importProject(PATH_TEST_COMPOSE);
// Run Docker Compose
runDockerCompose(PROJECT_TEST_COMPOSE, FILE_DOCKER_COMPOSE);
// Check if application is running
WebBrowserView browserView = new WebBrowserView();
browserView.open();
// Skip browser contents check, if mockito is used
if (!mockitoIsUsed()) {
browserView.openPageURL(URL);
BrowserContentsCheck.checkBrowserForErrorPage(browserView, URL);
}
}
use of org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab 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");
}
use of org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab in project linuxtools by eclipse.
the class PropertiesViewTest method testImagePropertiesTab.
@Test
public void testImagePropertiesTab() {
DockerImagesTab imagesTab = openDockerImagesTab();
imagesTab.selectImage(IMAGE_NAME);
// DockerExplorerView de = new DockerExplorerView();
// de.open();
// de.getDockerConnectionByName(getConnection().getName()).getImage(IMAGE_NAME).select();
PropertySheet propertiesView = new PropertySheet();
propertiesView.open();
propertiesView.selectTab("Info");
}
Aggregations