diff --git a/src/OrasProject.Oras/Packer.cs b/src/OrasProject.Oras/Packer.cs index b526789..f4816c2 100644 --- a/src/OrasProject.Oras/Packer.cs +++ b/src/OrasProject.Oras/Packer.cs @@ -43,9 +43,9 @@ public static class Packer /// private const string _errMissingArtifactType = "missing artifact type"; - public const string UnknownConfig = "application/vnd.unknown.config.v1+json"; + public const string MediaTypeUnknownConfig = "application/vnd.unknown.config.v1+json"; - public const string UnknownArtifact = "application/vnd.unknown.artifact.v1"; + public const string MediaTypeUnknownArtifact = "application/vnd.unknown.artifact.v1"; /// /// ManifestVersion represents the manifest version used for PackManifest @@ -143,7 +143,7 @@ private static async Task PackManifestV1_0Async(IPushable pusher, st { if (string.IsNullOrEmpty(artifactType)) { - artifactType = UnknownConfig; + artifactType = MediaTypeUnknownConfig; } ValidateMediaType(artifactType); configDescriptor = await PushCustomEmptyConfigAsync(pusher, artifactType, options.ConfigAnnotations, cancellationToken); diff --git a/tests/OrasProject.Oras.Tests/PackerTest.cs b/tests/OrasProject.Oras.Tests/PackerTest.cs index 51211cc..c656d87 100644 --- a/tests/OrasProject.Oras.Tests/PackerTest.cs +++ b/tests/OrasProject.Oras.Tests/PackerTest.cs @@ -297,8 +297,8 @@ public async Task TestPackManifestImageV1_0_NoArtifactType() // Verify artifact type and config media type - Assert.Equal(Packer.UnknownConfig, manifestDesc.ArtifactType); - Assert.Equal(Packer.UnknownConfig, manifest!.Config.MediaType); + Assert.Equal(Packer.MediaTypeUnknownConfig, manifestDesc.ArtifactType); + Assert.Equal(Packer.MediaTypeUnknownConfig, manifest!.Config.MediaType); } [Fact]