use of org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView in project linuxtools by eclipse.
the class ContainerLogTest method before.
@Before
public void before() {
deleteAllConnections();
getConnection();
pullImage(IMAGE_NAME);
new WaitWhile(new JobIsRunning());
DockerExplorerView explorer = new DockerExplorerView();
explorer.open();
getConnection().refresh();
getConnection().getImage(IMAGE_NAME).run();
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(explorer);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.setAllocatePseudoTTY();
firstPage.setKeepSTDINOpen();
firstPage.finish();
if (mockitoIsUsed()) {
runContainer();
getConnection().refresh();
new WaitUntil(new ContainerIsDeployedCondition(CONTAINER_NAME, getConnection()));
}
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
}
use of org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView in project linuxtools by eclipse.
the class DockerContainerTest method testRunDockerContainer.
@Test
public void testRunDockerContainer() {
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
assertTrue("Image has not been found!", imageIsDeployed(getCompleteImageName(IMAGE_NAME)));
DockerExplorerView explorer = new DockerExplorerView();
getConnection().getImage(getCompleteImageName(IMAGE_NAME)).run();
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(explorer);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.finish();
if (mockitoIsUsed()) {
MockUtils.runContainer(DEFAULT_CONNECTION_NAME, IMAGE_NAME, IMAGE_TAG_LATEST, CONTAINER_NAME);
}
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
new WaitWhile(new ConsoleHasNoChange());
assertTrue("Container does not exists!", containerIsDeployed(CONTAINER_NAME));
}
use of org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView in project linuxtools by eclipse.
the class NetworkModeTest method before.
@Before
public void before() throws DockerException, InterruptedException {
deleteAllConnections();
getConnection();
pullImage(IMAGE_NAME, IMAGE_TAG);
new WaitWhile(new JobIsRunning());
DockerExplorerView explorer = new DockerExplorerView();
getConnection().getImage(IMAGE_NAME).run();
firstPage = new ImageRunSelectionPage(explorer);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.setAllocatePseudoTTY();
firstPage.setKeepSTDINOpen();
firstPage.next();
ImageRunResourceVolumesVariablesPage variablesPage = new ImageRunResourceVolumesVariablesPage(firstPage);
variablesPage.next();
}
use of org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView in project linuxtools by eclipse.
the class ImageTagTest method testAddUpperCaseTagToImage.
@Test
public void testAddUpperCaseTagToImage() {
DockerExplorerView explorer = new DockerExplorerView();
explorer.open();
try {
getConnection().getImage(IMAGE_NAME).addTagToImage(IMAGE_TAG_UPPERCASE);
} catch (WaitTimeoutExpiredException ex) {
new CancelButton().click();
// swallowing, it is not possible to tag image with upper case
}
}
use of org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView 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();
}
Aggregations