use of org.eclipse.reddeer.common.wait.WaitUntil in project linuxtools by eclipse.
the class NetworkModeTest method checkNetworkMode.
private void checkNetworkMode(String networkMode) {
if (mockitoIsUsed()) {
runContainer(networkMode);
getConnection().refresh();
new WaitUntil(new ContainerIsDeployedCondition(CONTAINER_NAME, getConnection()));
}
new WaitWhile(new JobIsRunning());
PropertySheet propertiesView = openPropertiesTabForContainer("Inspect", CONTAINER_NAME);
String networkProp = propertiesView.getProperty("HostConfig", "NetworkMode").getPropertyValue();
assertTrue("Container is not running in " + networkMode + " network mode!", networkProp.equals(networkMode));
}
use of org.eclipse.reddeer.common.wait.WaitUntil 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.reddeer.common.wait.WaitUntil in project linuxtools by eclipse.
the class LaunchDockerImageTest method testLaunchConfiguration.
@Test
public void testLaunchConfiguration() {
String imageName = getCompleteImageName(IMAGE_HELLO_WORLD);
RunDockerImageLaunchConfiguration runImageConf = new RunDockerImageLaunchConfiguration();
try {
runDockerImageLaunchConfiguration(imageName + NAME_TAG_SEPARATOR + IMAGE_TAG_LATEST, CONTAINER_NAME, CONFIGURATION_NAME, runImageConf);
if (mockitoIsUsed()) {
MockUtils.runContainer(DEFAULT_CONNECTION_NAME, imageName, IMAGE_TAG_LATEST, CONTAINER_NAME);
getConnection().refresh();
new WaitUntil(new ContainerIsDeployedCondition(CONTAINER_NAME, getConnection()));
}
} catch (WaitTimeoutExpiredException ex) {
throw ex;
}
assertTrue("Container is not deployed!", containerIsDeployed(CONTAINER_NAME));
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project linuxtools by eclipse.
the class NewDockerConnectionPage method open.
public void open() {
new DockerExplorerView().open();
new DefaultToolItem("Add Connection").click();
new WaitUntil(new ShellIsAvailable(NEW_DOCKER_CONNECTION_SHELL), TimePeriod.LONG);
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project linuxtools by eclipse.
the class NewDockerConnectionPage method search.
public void search(String connectionName) {
new PushButton("Search...").click();
new WaitUntil(new ShellIsAvailable("Docker Connection Selection"));
Table table = new DefaultTable();
table.getItem(connectionName).select();
new OkButton().click();
}
Aggregations