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"));
}
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"));
}
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"));
}
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"));
}
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"));
}
Aggregations