Skip to content

feat: added Client.check_switchers for smoke testing (remote)#36

Merged
petruki merged 1 commit intomasterfrom
staging
Mar 7, 2026
Merged

feat: added Client.check_switchers for smoke testing (remote)#36
petruki merged 1 commit intomasterfrom
staging

Conversation

@petruki
Copy link
Member

@petruki petruki commented Mar 7, 2026

This pull request introduces a new feature for remotely verifying the configuration of switchers and adds robust error handling for this process. The main changes include implementing the check_switchers method in the client, handling API errors and missing switchers with custom exceptions, and providing comprehensive tests to ensure correct behavior.

Remote Switcher Verification

  • Added Client.check_switchers method to verify if specified switchers are properly configured by interacting with the remote API.
  • Implemented Remote.check_switchers method to perform the remote API call, handle errors, and raise RemoteSwitcherError if any switchers are not found.

Error Handling

  • Introduced new RemoteSwitcherError exception for cases where specified switchers are missing, and updated imports and exports to include it. [1] [2] [3]

Testing

  • Added tests/test_client_check_switchers.py with tests for successful verification, missing switchers, and API errors, using HTTPX mocking for API responses.
  • Added a playground test case to demonstrate check_switchers usage and error output.

Miscellaneous

  • Updated imports in client.py to support new functionality.

@petruki petruki self-assigned this Mar 7, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2026

@petruki petruki merged commit ad69756 into master Mar 7, 2026
15 checks passed
@petruki petruki deleted the staging branch March 7, 2026 22:35
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.

1 participant