Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRastislav Wagner2018-05-10 08:36:44 -0400
committerAlexander Kurtakov2018-05-10 10:38:33 -0400
commit46e2d2bdeb5a69cee040f8fbba9c15609259ec53 (patch)
treecd06110235d0907d5adea18de0e7beaed74b62f7
parent389ffcfe5cd48edcf6a364b7582a54cee2a0c289 (diff)
downloadorg.eclipse.linuxtools-46e2d2bdeb5a69cee040f8fbba9c15609259ec53.tar.gz
org.eclipse.linuxtools-46e2d2bdeb5a69cee040f8fbba9c15609259ec53.tar.xz
org.eclipse.linuxtools-46e2d2bdeb5a69cee040f8fbba9c15609259ec53.zip
Call open() before docker view is used.
Change-Id: Ic89c968902679a3054db7172d2de8b06d9e5377d Signed-off-by: Rastislav Wagner <rawagner@redhat.com> Reviewed-on: https://git.eclipse.org/r/122418 Tested-by: CI Bot Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/DockerContainerTest.java1
-rw-r--r--containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/NetworkModeTest.java1
-rw-r--r--containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/ui/SearchDialogTest.java1
-rw-r--r--containers/org.eclipse.linuxtools.docker.reddeer/src/org/eclipse/linuxtools/docker/reddeer/ui/DockerExplorerView.java8
4 files changed, 11 insertions, 0 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/DockerContainerTest.java b/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/DockerContainerTest.java
index e54ee520f2..9d5db74e5c 100644
--- a/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/DockerContainerTest.java
+++ b/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/DockerContainerTest.java
@@ -49,6 +49,7 @@ public class DockerContainerTest extends AbstractImageBotTest {
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
assertTrue("Image has not been found!", imageIsDeployed(getCompleteImageName(IMAGE_NAME)));
DockerExplorerView explorer = new DockerExplorerView();
+ explorer.open();
getConnection().getImage(getCompleteImageName(IMAGE_NAME)).run();
ImageRunSelectionPage firstPage = new ImageRunSelectionPage(explorer);
firstPage.setContainerName(CONTAINER_NAME);
diff --git a/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/NetworkModeTest.java b/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/NetworkModeTest.java
index 3f8c0303be..c48db9d9b1 100644
--- a/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/NetworkModeTest.java
+++ b/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/container/NetworkModeTest.java
@@ -60,6 +60,7 @@ public class NetworkModeTest extends AbstractImageBotTest {
pullImage(IMAGE_NAME, IMAGE_TAG);
new WaitWhile(new JobIsRunning());
DockerExplorerView explorer = new DockerExplorerView();
+ explorer.open();
getConnection().getImage(IMAGE_NAME).run();
firstPage = new ImageRunSelectionPage(explorer);
firstPage.setContainerName(CONTAINER_NAME);
diff --git a/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/ui/SearchDialogTest.java b/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/ui/SearchDialogTest.java
index 7c4f6b7eaf..9ce46f6a30 100644
--- a/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/ui/SearchDialogTest.java
+++ b/containers/org.eclipse.linuxtools.docker.integration.tests/src/org/eclipse/linuxtools/docker/integration/tests/ui/SearchDialogTest.java
@@ -61,6 +61,7 @@ public class SearchDialogTest extends AbstractImageBotTest {
@Test
public void testSearchDialog() {
DockerExplorerView explorer = new DockerExplorerView();
+ explorer.open();
getConnection().openImageSearchDialog(IMAGE_NAME, null, REGISTRY_URL);
ImageSearchPage pageOne = new ImageSearchPage(explorer);
pageOne.searchImage();
diff --git a/containers/org.eclipse.linuxtools.docker.reddeer/src/org/eclipse/linuxtools/docker/reddeer/ui/DockerExplorerView.java b/containers/org.eclipse.linuxtools.docker.reddeer/src/org/eclipse/linuxtools/docker/reddeer/ui/DockerExplorerView.java
index 58f2a37ca5..139a2dd501 100644
--- a/containers/org.eclipse.linuxtools.docker.reddeer/src/org/eclipse/linuxtools/docker/reddeer/ui/DockerExplorerView.java
+++ b/containers/org.eclipse.linuxtools.docker.reddeer/src/org/eclipse/linuxtools/docker/reddeer/ui/DockerExplorerView.java
@@ -65,10 +65,12 @@ public class DockerExplorerView extends WorkbenchView {
}
private String getName(TreeItem item) {
+ activate();
return treeViewerHandler.getNonStyledText(item);
}
private String getHost(TreeItem item) {
+ activate();
String[] styledTexts = treeViewerHandler.getStyledTexts(item);
if (styledTexts == null || styledTexts.length == 0) {
return null;
@@ -77,14 +79,17 @@ public class DockerExplorerView extends WorkbenchView {
}
public boolean connectionExistForName(String connectionName) {
+ activate();
return getDockerConnectionByName(connectionName) != null;
}
public boolean connectionExistForHost(String host) {
+ activate();
return getDockerConnectionByHost(host) != null;
}
public void refreshView() {
+ activate();
List<String> connections = getDockerConnectionNames();
for (String connection : connections) {
getDockerConnectionByName(connection).refresh();
@@ -112,6 +117,7 @@ public class DockerExplorerView extends WorkbenchView {
* unix socket of a docker daemon
*/
public void createDockerConnectionUnix(String connectionName, String unixSocket) {
+ activate();
createDockerConnection(AuthenticationMethod.UNIX_SOCKET, unixSocket, null, connectionName);
}
@@ -124,6 +130,7 @@ public class DockerExplorerView extends WorkbenchView {
*/
public void createDockerConnectionUnix(final IDockerConnection... connections) {
+ activate();
final IDockerConnectionStorageManager connectionStorageManager = MockDockerConnectionStorageManagerFactory
.providing(connections);
DockerConnectionManager.getInstance().setConnectionStorageManager(connectionStorageManager);
@@ -139,6 +146,7 @@ public class DockerExplorerView extends WorkbenchView {
* path to a certificate
*/
public void createDockerConnectionURI(String connectionName, String tcpURI, String certificatePath) {
+ activate();
createDockerConnection(AuthenticationMethod.TCP_CONNECTION, tcpURI, certificatePath, connectionName);
}

Back to the top