-
Notifications
You must be signed in to change notification settings - Fork 97
Create extra integration tests for Resource lock #870
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
Create extra integration tests for Resource lock #870
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 two integration tests for the Resource lock functionality to verify error handling scenarios: attempting to create conflicting lock types on the same resource, and attempting to create a lock with an invalid entity ID.
Key Changes
- Added
TestTryToLockTwoResourcesWithTheSameTypeto verify that creating a second lock with a different lock type on the same resource produces an error - Added
TestTryToCreateWithInvalidDatato verify that attempting to create a lock with a non-existent entity ID returns the expected error message - Imported
testify/assertandtestify/requirepackages for improved test assertions
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/integration/locks_test.go | Added two new test functions with testify assertions to validate lock creation error scenarios |
| test/integration/fixtures/TestLockTryToLockResourceTwice.yaml | Added fixture data for testing conflicting lock types on the same resource |
| test/integration/fixtures/TestLockTryToCreateWithNotExistingEntityID.yaml | Added fixture data for testing lock creation with an invalid entity ID |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ed420ff to
2a6b8eb
Compare
ezilber-akamai
left a comment
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 pass locally. Nice work!
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
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5c54d03 to
3933f05
Compare
✔️ How to Test