Skip to content

HDDS-13678. Refactor presigned URL integration tests#9037

Merged
ivandika3 merged 5 commits intoapache:masterfrom
hevinhsu:HDDS-13678
Sep 17, 2025
Merged

HDDS-13678. Refactor presigned URL integration tests#9037
ivandika3 merged 5 commits intoapache:masterfrom
hevinhsu:HDDS-13678

Conversation

@hevinhsu
Copy link
Contributor

What changes were proposed in this pull request?

Refactor test cases for better organization and code reuse.

Please describe your PR in detail:

  • Grouped related test cases using @Nested for clearer test structure.
  • Extracted common object setup to reduce duplicated code, including:
    • S3 bucket creation
    • SdkHttpClient creation
    • S3Presigner creation
    • Constants extraction:
      • Bucket name
      • Content for upload
      • Duration for presigned url expiration
  • Introduced a shared helper method (openHttpURLConnection) for reuse across tests.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-13678

How was this patch tested?

https://github.com/hevinhsu/ozone/actions/runs/17721451820

@peterxcli peterxcli requested a review from ivandika3 September 16, 2025 08:27
@peterxcli peterxcli added test s3 S3 Gateway code-cleanup Changes that aim to make code better, without changing functionality. labels Sep 16, 2025
Copy link
Contributor

@ivandika3 ivandika3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for streamlining the tests. LGTM +1.

@ivandika3 ivandika3 merged commit 0a8edfd into apache:master Sep 17, 2025
53 of 54 checks passed
@hevinhsu
Copy link
Contributor Author

Thanks @ivandika3 for the review and merge.

@hevinhsu hevinhsu deleted the HDDS-13678 branch September 17, 2025 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-cleanup Changes that aim to make code better, without changing functionality. s3 S3 Gateway test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants