use of org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageRunSelectionPage in project linuxtools by eclipse.
the class LinkContainersTest method openImageRunSelectionPage.
private ImageRunSelectionPage openImageRunSelectionPage(String containerName, boolean publishAllExposedPorts, DockerImagesTab imagesTab) {
ImageRunSelectionPage page = new ImageRunSelectionPage(imagesTab);
page.setContainerName(containerName);
page.setPublishAllExposedPorts(publishAllExposedPorts);
return page;
}
use of org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageRunSelectionPage 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.core.ui.wizards.ImageRunSelectionPage in project linuxtools by eclipse.
the class UnconfinedTest method testUnconfined.
@Test
public void testUnconfined() {
DockerImagesTab imagesTab = openDockerImagesTab();
imagesTab.runImage(IMAGE_NAME + ":" + IMAGE_TAG);
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(imagesTab);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.setAllocatePseudoTTY();
firstPage.setKeepSTDINOpen();
firstPage.setUnconfined();
firstPage.finish();
if (mockitoIsUsed()) {
runUnconfinedContainer();
// MockDockerClientFactory.addContainer(this.client,
// this.createdContainer, this.containerInfo);
getConnection().refresh();
new WaitUntil(new ContainerIsDeployedCondition(CONTAINER_NAME, getConnection()));
}
new WaitWhile(new JobIsRunning());
PropertySheet propertiesView = openPropertiesTabForContainer("Inspect", CONTAINER_NAME);
String securityProp = propertiesView.getProperty("HostConfig", "SecurityOpt", "").getPropertyValue();
assertTrue("Container is not running in seccomp:unconfined mode!", securityProp.equals("seccomp:unconfined"));
}
use of org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageRunSelectionPage in project linuxtools by eclipse.
the class VariablesTest method testVariables.
@Test
public void testVariables() {
getConnection();
DockerImagesTab imagesTab = openDockerImagesTab();
buildImage(IMAGE_NAME, "resources/test-variables", imagesTab);
if (mockitoIsUsed()) {
MockUtils.pullImage(DEFAULT_CONNECTION_NAME, IMAGE_NAME, IMAGE_TAG_LATEST);
}
assertConsoleSuccess();
imagesTab.activate();
imagesTab.refresh();
new WaitWhile(new JobIsRunning());
imagesTab.runImage(IMAGE_NAME);
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(imagesTab);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.next();
ImageRunResourceVolumesVariablesPage secondPage = new ImageRunResourceVolumesVariablesPage(firstPage);
secondPage.addEnviromentVariable("FOO", "barbarbar");
if (mockitoIsUsed()) {
MockDockerClientFactory.addContainer(this.client, this.createdContainer, this.containerInfo);
}
secondPage.finish();
new WaitWhile(new JobIsRunning());
assertConsoleContains("FOO is barbarbar");
}
use of org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageRunSelectionPage 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