Skip to content

Enhance resize volume fake client #243

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amankothiyal04
Copy link

[Enhancement] Update fake client to match the actual API behaviour for ResizeVolume method

This PR updates the fake client's ResizeVolume method to better match the actual API behavior by adding proper error handling for various scenarios. This addresses issue #233.

Changes

  • Added error handling for attached volumes (can't resize while attached)
  • Added validation for volume size (must increase)
  • Added simulation of occasional resize failures
  • Updated tests to cover all error scenarios
  • Added changelog entry

Testing

  • Added comprehensive test cases covering:
    • Successful resize
    • Volume not found
    • Volume still attached
    • Invalid size (not increasing)
    • Random failures simulation

Related Issues

Closes #233

- Added PriceMonthly and PriceHourly fields to InstanceSize struct
- Updated tests to include price information validation
- Added changelog entry

Closes civo#201
- Added error handling for attached volumes
- Added validation for volume size
- Added simulation of occasional resize failures
- Updated tests to cover all error scenarios
- Added changelog entry

Closes civo#233
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.

[Enhancement] Update fake client to match the actual API behaviour for ResizeVolume method
1 participant