Search in sources :

Example 1 with RunDockerImageLaunchConfiguration

use of org.eclipse.linuxtools.docker.reddeer.ui.RunDockerImageLaunchConfiguration in project linuxtools by eclipse.

the class LaunchDockerImageTest method deleteIfExists.

private void deleteIfExists(String configurationName) {
    RunDockerImageLaunchConfiguration runImageConf = new RunDockerImageLaunchConfiguration();
    try {
        runImageConf.open();
        runImageConf.deleteRunConfiguration(configurationName);
        runImageConf.close();
    } catch (RedDeerException e) {
    // catched intentionally
    }
}
Also used : RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) RunDockerImageLaunchConfiguration(org.eclipse.linuxtools.docker.reddeer.ui.RunDockerImageLaunchConfiguration)

Example 2 with RunDockerImageLaunchConfiguration

use of org.eclipse.linuxtools.docker.reddeer.ui.RunDockerImageLaunchConfiguration 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));
}
Also used : WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) RunDockerImageLaunchConfiguration(org.eclipse.linuxtools.docker.reddeer.ui.RunDockerImageLaunchConfiguration) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) ContainerIsDeployedCondition(org.eclipse.linuxtools.docker.reddeer.condition.ContainerIsDeployedCondition) Test(org.junit.Test) AbstractImageBotTest(org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest)

Aggregations

RunDockerImageLaunchConfiguration (org.eclipse.linuxtools.docker.reddeer.ui.RunDockerImageLaunchConfiguration)2 AbstractImageBotTest (org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest)1 ContainerIsDeployedCondition (org.eclipse.linuxtools.docker.reddeer.condition.ContainerIsDeployedCondition)1 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)1 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 Test (org.junit.Test)1