Skip to content

Commit 3c32bda

Browse files
authored
Add two constants to running container media type (#734)
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com>
1 parent 433420a commit 3c32bda

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/main/java/land/oras/utils/Const.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,16 @@ private Const() {
194194
*/
195195
public static final String DEFAULT_MANIFEST_MEDIA_TYPE = "application/vnd.oci.image.manifest.v1+json";
196196

197+
/**
198+
* Media type for config of running container
199+
*/
200+
public static final String CONFIG_RUNNING_CONTAINER_MEDIA_TYPE = "application/vnd.oci.image.config.v1+json";
201+
202+
/**
203+
* Media type for config of running docker
204+
*/
205+
public static final String CONFIG_RUNNING_DOCKER_MEDIA_TYPE = "application/vnd.docker.container.image.v1+json";
206+
197207
/**
198208
* The default accept type for the manifest
199209
*/

src/test/java/land/oras/utils/ConstTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,7 @@ void shouldValidateAnnotations() {
3636
assertEquals("org.opencontainers.image.revision", Const.ANNOTATION_REVISION);
3737
assertEquals("org.opencontainers.image.created", Const.ANNOTATION_CREATED);
3838
assertEquals("org.opencontainers.image.ref.name", Const.ANNOTATION_REF);
39+
assertEquals("application/vnd.oci.image.config.v1+json", Const.CONFIG_RUNNING_CONTAINER_MEDIA_TYPE);
40+
assertEquals("application/vnd.docker.container.image.v1+json", Const.CONFIG_RUNNING_DOCKER_MEDIA_TYPE);
3941
}
4042
}

0 commit comments

Comments
 (0)