-
Notifications
You must be signed in to change notification settings - Fork 34
test(set): Improve set command E2E coverage #143
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
base: main
Are you sure you want to change the base?
test(set): Improve set command E2E coverage #143
Conversation
...est_set_gateway_virtualnetwork_success[capacityId-00000000-0000-0000-0000-000000000000].yaml
Outdated
Show resolved
Hide resolved
...est_commands/recordings/test_commands/test_set/test_set_sparkpool_success[name-newName].yaml
Show resolved
Hide resolved
| if metadata_to_set == "displayName": | ||
| set(new_entity.full_path, query="displayName", input=entity.display_name) | ||
| elif metadata_to_set == "name": | ||
| set(new_entity.full_path, query="name", input=entity.display_name) |
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.
if query is name, does input is entity.display_name?
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.
Yes. EntitiyMetadata has the Fabric resource type suffix - some-name.Type while displayName doesnt have the suffix.
This pull request refactors and enhances the test suite for the
setcommand, focusing on improving code reuse, and increasing test coverage for gateway and spark pool metadata updates.Test Refactoring and Parameterization:
test_set_sparkpool_successandtest_set_gateway_virtualNetwork_successto use parameterized test cases, allowing multiple metadata fields and input values to be tested more efficiently. The tests now call a shared helper method (_test_set_metadata_success) for improved code reuse and maintainability. [1] [2]Gateway Metadata and Cache Handling:
numberOfMemberGateways,inactivityMinutesBeforeSleep,displayName) and a new test for updating thecapacityIdfield.upsert_gateway_to_cachefixture to mock gateway cache updates in relevant tests.