use of org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet in project linuxtools by eclipse.
the class AbstractDockerBotTest method openPropertiesTab.
protected PropertySheet openPropertiesTab(String tabName) {
PropertySheet propertiesView = new PropertySheet();
propertiesView.open();
getConnection().select();
propertiesView.selectTab(tabName);
return propertiesView;
}
use of org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet in project linuxtools by eclipse.
the class AbstractDockerBotTest method openPropertiesTabForContainer.
protected PropertySheet openPropertiesTabForContainer(String tabName, String containerName) {
PropertySheet propertiesView = new PropertySheet();
propertiesView.open();
getConnection().getContainer(containerName).select();
propertiesView.selectTab(tabName);
return propertiesView;
}
use of org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet in project linuxtools by eclipse.
the class AbstractDockerBotTest method isDockerDaemon.
/**
* Returns {@code true} if the running docker daemon matches at least the
* given major and minor version. Returns {@code false} otherwise.
*
* @param majorVersion
* @param minorVersion
* @return
*/
protected boolean isDockerDaemon(int majorVersion, int minorVersion) {
PropertySheet infoTab = openPropertiesTab("Info");
getConnection().select();
String daemonVersion = infoTab.getProperty("Version").getPropertyValue();
assertTrue("Could not retrieve docker daemon version.", !StringUtils.isBlank(daemonVersion));
String[] versionComponents = daemonVersion.split("\\.");
assertTrue("Could not evaluate docker daemon version " + daemonVersion, versionComponents == null || versionComponents.length >= 2);
int actualMajorVersion = Integer.parseInt(versionComponents[0]);
if (actualMajorVersion > majorVersion) {
return true;
}
int actualMinorVersion = Integer.parseInt(versionComponents[1]);
return actualMinorVersion >= minorVersion;
}
use of org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet in project linuxtools by eclipse.
the class LabelsTest method testLabels.
@Test
public void testLabels() {
DockerImagesTab imagesTab = openDockerImagesTab();
imagesTab.runImage(IMAGE_NAME + ":" + IMAGE_TAG);
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(imagesTab);
firstPage.setContainerName(CONTAINER_NAME);
firstPage.setAllocatePseudoTTY();
firstPage.setKeepSTDINOpen();
firstPage.setGiveExtendedPrivileges();
firstPage.next();
ImageRunResourceVolumesVariablesPage secondPage = new ImageRunResourceVolumesVariablesPage(firstPage);
secondPage.addLabel(CONTAINER_LABEL_KEY, CONTAINER_LABEL_VALUE);
secondPage.finish();
new WaitWhile(new JobIsRunning());
if (mockitoIsUsed()) {
// MockDockerClientFactory.addContainer(this.client, this.createdContainer, this.containerInfo);
runContainer();
getConnection().refresh();
new WaitUntil(new ContainerIsDeployedCondition(CONTAINER_NAME, getConnection()));
}
DockerContainersTab containerTab = new DockerContainersTab();
containerTab.searchContainer(CONTAINER_NAME);
containerTab.select(CONTAINER_NAME);
PropertySheet propertiesView = new PropertySheet();
propertiesView.open();
getConnection().getContainer(CONTAINER_NAME).select();
propertiesView.selectTab("Inspect");
String labelProp = propertiesView.getProperty("Config", "Labels", CONTAINER_LABEL_KEY).getPropertyValue();
assertTrue("Container does not have label " + CONTAINER_LABEL_KEY + "!", labelProp.equals(CONTAINER_LABEL_VALUE));
}
use of org.eclipse.reddeer.eclipse.ui.views.properties.PropertySheet in project linuxtools by eclipse.
the class LinkContainersTest method getHttpServerAddress.
private String getHttpServerAddress(String containerName) {
PropertySheet propertiesView = new PropertySheet();
propertiesView.open();
getConnection().getContainer(containerName).select();
propertiesView.selectTab("Inspect");
return propertiesView.getProperty("NetworkSettings", "IPAddress").getPropertyValue();
}
Aggregations