Search in sources :

Example 6 with DockerConfigMetaData

use of org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData in project jbosstools-openshift by jbosstools.

the class DockerConfigMetaDataTest method checkThatContainerConfigEnvAreReturnedWhenNoConfig.

@Test
public void checkThatContainerConfigEnvAreReturnedWhenNoConfig() {
    doReturn(createContainerConfig(null, Collections.singletonList("PATH=a"), null)).when(imageInfo).containerConfig();
    DockerConfigMetaData meta = new DockerConfigMetaData(imageInfo);
    assertThat(meta.env()).isEqualTo(Collections.singletonList("PATH=a"));
}
Also used : DockerConfigMetaData(org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData) Test(org.junit.Test)

Example 7 with DockerConfigMetaData

use of org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData in project jbosstools-openshift by jbosstools.

the class DockerConfigMetaDataTest method checkThatContainerConfigEnvAreReturnedWhenEmptyConfig.

@Test
public void checkThatContainerConfigEnvAreReturnedWhenEmptyConfig() {
    doReturn(createContainerConfig(null, null, null)).when(imageInfo).config();
    doReturn(createContainerConfig(null, Collections.singletonList("PATH=a"), null)).when(imageInfo).containerConfig();
    DockerConfigMetaData meta = new DockerConfigMetaData(imageInfo);
    assertThat(meta.env()).isEqualTo(Collections.singletonList("PATH=a"));
}
Also used : DockerConfigMetaData(org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData) Test(org.junit.Test)

Example 8 with DockerConfigMetaData

use of org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData in project jbosstools-openshift by jbosstools.

the class DockerConfigMetaDataTest method checkThatContainerConfigVolumesAreReturnedWhenEmptyConfig.

@Test
public void checkThatContainerConfigVolumesAreReturnedWhenEmptyConfig() {
    doReturn(createContainerConfig(null, null, null)).when(imageInfo).config();
    doReturn(createContainerConfig(null, null, Collections.singleton("Work"))).when(imageInfo).containerConfig();
    DockerConfigMetaData meta = new DockerConfigMetaData(imageInfo);
    assertThat(meta.volumes()).isEqualTo(Collections.singleton("Work"));
}
Also used : DockerConfigMetaData(org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData) Test(org.junit.Test)

Example 9 with DockerConfigMetaData

use of org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData in project jbosstools-openshift by jbosstools.

the class DockerConfigMetaDataTest method checkThatContainerConfigVolumesAreReturnedWhenNoConfig.

@Test
public void checkThatContainerConfigVolumesAreReturnedWhenNoConfig() {
    doReturn(createContainerConfig(null, null, Collections.singleton("Work"))).when(imageInfo).containerConfig();
    DockerConfigMetaData meta = new DockerConfigMetaData(imageInfo);
    assertThat(meta.volumes()).isEqualTo(Collections.singleton("Work"));
}
Also used : DockerConfigMetaData(org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData) Test(org.junit.Test)

Example 10 with DockerConfigMetaData

use of org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData in project jbosstools-openshift by jbosstools.

the class DockerConfigMetaDataTest method checkThatConfigVolumesAreReturnedWhenConfig.

@Test
public void checkThatConfigVolumesAreReturnedWhenConfig() {
    doReturn(createContainerConfig(null, null, Collections.singleton("Work1"))).when(imageInfo).config();
    doReturn(createContainerConfig(null, null, Collections.singleton("Work2"))).when(imageInfo).containerConfig();
    DockerConfigMetaData meta = new DockerConfigMetaData(imageInfo);
    assertThat(meta.volumes()).isEqualTo(Collections.singleton("Work1"));
}
Also used : DockerConfigMetaData(org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData) Test(org.junit.Test)

Aggregations

DockerConfigMetaData (org.jboss.tools.openshift.internal.core.docker.DockerConfigMetaData)10 Test (org.junit.Test)9 DockerImageURI (com.openshift.restclient.images.DockerImageURI)1 IDockerImageInfo (org.eclipse.linuxtools.docker.core.IDockerImageInfo)1