Skip to content

Conversation

@psnoch-akamai
Copy link
Contributor

@psnoch-akamai psnoch-akamai commented Dec 18, 2025

✔️ How to Test

make TEST_ARGS="-run TestTryToLockTwoResourcesWithTheSameType"
make TEST_ARGS="-run TestTryToCreateWithInvalidData"

Copilot AI review requested due to automatic review settings December 18, 2025 15:57
@psnoch-akamai psnoch-akamai requested a review from a team as a code owner December 18, 2025 15:57
@psnoch-akamai psnoch-akamai requested review from ezilber-akamai, vshanthe and zliang-akamai and removed request for a team December 18, 2025 15:57
Copy link
Contributor

Copilot AI left a 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 TestTryToLockTwoResourcesWithTheSameType to verify that creating a second lock with a different lock type on the same resource produces an error
  • Added TestTryToCreateWithInvalidData to verify that attempting to create a lock with a non-existent entity ID returns the expected error message
  • Imported testify/assert and testify/require packages 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.

Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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.

@psnoch-akamai psnoch-akamai force-pushed the TPT-4097-resource-lock-extra-integration-tests branch from ed420ff to 2a6b8eb Compare December 19, 2025 12:26
Copy link
Contributor

@ezilber-akamai ezilber-akamai left a 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!

@zliang-akamai zliang-akamai requested a review from Copilot January 14, 2026 07:23
Copy link
Contributor

Copilot AI left a 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.

@psnoch-akamai psnoch-akamai force-pushed the TPT-4097-resource-lock-extra-integration-tests branch from 5c54d03 to 3933f05 Compare January 16, 2026 14:29
@zliang-akamai zliang-akamai self-requested a review January 16, 2026 17:00
@psnoch-akamai psnoch-akamai merged commit bb05d6d into main Jan 20, 2026
10 checks passed
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.

4 participants