Skip to content

KNOX-3443: add unit test coverage for MimeTypes - #1385

Open
Raghav-Mah3shwari wants to merge 1 commit into
apache:masterfrom
Raghav-Mah3shwari:KNOX-3443
Open

KNOX-3443: add unit test coverage for MimeTypes#1385
Raghav-Mah3shwari wants to merge 1 commit into
apache:masterfrom
Raghav-Mah3shwari:KNOX-3443

Conversation

@Raghav-Mah3shwari

@Raghav-Mah3shwari Raghav-Mah3shwari commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This patch adds comprehensive unit test coverage for
org.apache.knox.gateway.util.MimeTypes.

The tests cover:

  • MIME type creation and parsing
  • Null MIME type handling
  • Charset insertion, replacement, and preservation
  • Existing MIME type parameters
  • Malformed MIME type input
  • Explicit and default charset lookup
  • Case-insensitive and whitespace-tolerant MIME type matching
  • Unknown, empty, and parameterized MIME types
  • All configured default MIME type mappings

How was this patch tested?

Executed the following command from the repository root:

mvn -pl gateway-util-common -Dtest=MimeTypesTest test

Integration Tests

No integration tests were added or modified. This change only adds unit tests for existing utility behavior and does not introduce a new feature, external integration, or workflow change.

UI changes

Not applicable. This patch does not include UI changes.

@smolnar82 smolnar82 changed the title NOX-3443: dd unit test coverage for MimeTypes NOX-3443: add unit test coverage for MimeTypes Sep 9, 2026
@smolnar82 smolnar82 changed the title NOX-3443: add unit test coverage for MimeTypes KNOX-3443: add unit test coverage for MimeTypes Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Test Results

  4 files    4 suites   40s ⏱️
 84 tests  84 ✅ 0 💤 0 ❌
102 runs  102 ✅ 0 💤 0 ❌

Results for commit 29f8e7b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants