- Notifications
You must be signed in to change notification settings - Fork 98
Added integration tests for Private Image Sharing #831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added integration tests for Private Image Sharing #831
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds integration tests for Private Image Sharing functionality and corrects several data type inconsistencies in the codebase. The changes ensure proper field naming alignment between the API responses and the Go struct definitions, while adding comprehensive end-to-end testing coverage.
- Corrected field names in image sharing structures to match API responses
- Fixed data type from int to string for private image ID parameters
- Added comprehensive integration tests covering the full image sharing workflow
- Updated request handling to support POST operations for paginated results
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/images_test.go | Removed duplicate assertion line in unit test |
| test/unit/image_sharegroups_producer_test.go | Updated field names and parameter types to match corrected API schema |
| test/unit/fixtures/image_sharegroup_producer_add_images.json | Added proper JSON wrapper structure with data field |
| test/unit/fixtures/image_get_private_shared.json | Corrected field name in JSON fixture |
| test/integration/image_sharegroups_test.go | Added comprehensive integration test suite covering full image sharing workflow |
| test/integration/fixtures/TestImageSharing_Suite.yaml | Added test fixture data for integration tests |
| request_helpers.go | Added support for POST method in paginated request handling |
| images.go | Corrected field name in ImageSharingSharedWith struct |
| image_sharegroups_producer.go | Updated field names, parameter types, and method implementation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…lber-akamai/linodego into TPT-3957-private-image-sharing-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are passing on my end, great work!
(Failing CI is a recurring fixtures issue unrelated to this PR)
861663d into linode:proj/private-image-sharing * Added support for Private Image Sharing (#800) * Added support for Private Image Sharing * Add missing endpoint * Fix lint * Addressed copilot suggestions * Reran monthly transfer fixture * Addressed PR comments * More PR comments * Added integration tests for Private Image Sharing (#831) * Fixes and added integration tests * Separate ImageShareEntry struct and address PR comments * Fix lint * Addressed PR comments * Reran GetMonthlyTransfer fixture * Remove LA notices * Copilot suggestions * Fixed TestInstance_GetMonthlyTransfer fixture
📝 Description
Corrected some incorrect data types and added integration tests for Private Image Sharing
✔️ How to Test
Unit Testing
make test-unitIntegration Testing
make test-int TEST_ARGS="-run TestImageSharing_Suite"