use of org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet in project linuxtools by eclipse.
the class AbstractDockerBotTest method openPropertiesTabForImage.
protected PropertySheet openPropertiesTabForImage(String tabName, String imageName) {
PropertySheet propertiesView = new PropertySheet();
propertiesView.open();
getConnection().getImage(imageName).select();
propertiesView.selectTab(tabName);
return propertiesView;
}
use of org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet in project linuxtools by eclipse.
the class BasicSecurityTest method testBasicSecurity.
@Test
public void testBasicSecurity() {
DockerImagesTab imagesTab = openDockerImagesTab();
imagesTab.runImage(IMAGE_NAME + ":" + IMAGE_TAG);
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(imagesTab);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.setAllocatePseudoTTY();
firstPage.setKeepSTDINOpen();
firstPage.setBasicSecurity();
firstPage.finish();
if (mockitoIsUsed()) {
runContainer();
// 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 readonlyProp = propertiesView.getProperty("HostConfig", "ReadonlyRootfs").getPropertyValue();
assertTrue("Container is not running read-only!", readonlyProp.equals("true"));
String tmpfsProp = propertiesView.getProperty("HostConfig", "Tmpfs", "/run").getPropertyValue();
assertTrue("Container /run is not tmpfs rw,exec!", tmpfsProp.equals("rw,exec"));
tmpfsProp = propertiesView.getProperty("HostConfig", "Tmpfs", "/tmp").getPropertyValue();
assertTrue("Container /tmp is not tmpfs rw,exec!", tmpfsProp.equals("rw,exec"));
String capDropProp = propertiesView.getProperty("HostConfig", "CapDrop", "").getPropertyValue();
assertTrue("Container does not have capDrop all!", capDropProp.equals("all"));
}
use of org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet 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.eclipse.ui.views.properties.PropertySheet 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.eclipse.ui.views.properties.PropertySheet 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