feat: add encryption/decryption integration test #2054
Merged
lanfon72 merged 1 commit intoharvester:mainfrom Jun 23, 2025
Merged
feat: add encryption/decryption integration test #2054lanfon72 merged 1 commit intoharvester:mainfrom
lanfon72 merged 1 commit intoharvester:mainfrom
Conversation
d542091 to
76e4bfc
Compare
b8f3e0b to
7c29cfd
Compare
75380b0 to
45296a6
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces integration tests for volume encryption and decryption along with associated API client manager updates to support secret and storage class operations for encrypted images.
- New integration tests for creating encrypted and decrypted images, including tests for failure scenarios.
- Addition of secret management support and improvements in storage class parameter merging.
- API client updates for images and secrets modules to enable crypto image creation using encryption parameters.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| harvester_e2e_tests/integrations/test_1_security_images.py | Added integration tests for encrypted/decrypted images using various secret combinations and validation of error responses. |
| harvester_e2e_tests/integrations/test_1_images.py | Updated shared image fixture and image status waiting functions; minor improvements in error logging. |
| apiclient/harvester_api/managers/storageclasses.py | Introduced create_by_parameters to merge custom parameters into storage class creation data. |
| apiclient/harvester_api/managers/secrets.py | Added new SecretManager to support secret creation, retrieval, and deletion for encryption tests. |
| apiclient/harvester_api/managers/images.py | Added create_crypto_image function for handling encrypted/decrypted image creation. |
| apiclient/harvester_api/managers/init.py | Exported SecretManager for broader API client access. |
| apiclient/harvester_api/api.py | Updated API load to include SecretManager. |
lanfon72
requested changes
Jun 17, 2025
Member
There was a problem hiding this comment.
as this will add the dependency on secrets, so the it should named starts with test_2
Contributor
Author
197ca81 to
588357f
Compare
Signed-off-by: Jack Yu <jack.yu@suse.com>
lanfon72
approved these changes
Jun 23, 2025
Member
|
link to #1483 |
Member
|
Tested with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Which issue(s) this PR fixes:
Issue harvester/harvester#8148
What this PR does / why we need it:
Special notes for your reviewer:
I created these codes with this prompt and copilot instruction from #2066 and refactored them manually.
Additional documentation or context