Skip to content
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

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

Open
Praveen005 opened this issue Feb 11, 2025 · 0 comments

Comments

@Praveen005
Copy link
Contributor

Praveen005 commented Feb 11, 2025

Summary

If we see the fake client implementation of ResizeVolume method, it only errors out in one situation when the volume we are looking for is not there (throws ZeroMatchesError). But on the API side, we can see that it can throw error for various other reasons (e.g., retry errors, VolumeResizeOnlineError and other upstream errors)

civogo/fake_client.go

Lines 1290 to 1300 in 21b9e19

func (c *FakeClient) ResizeVolume(id string, size int) (*SimpleResponse, error) {
for i, volume := range c.Volumes {
if volume.ID == id {
c.Volumes[i].SizeGigabytes = size
return &SimpleResponse{Result: "success"}, nil
}
}
err := fmt.Errorf("unable to find volume %s, zero matches", id)
return nil, ZeroMatchesError.wrap(err)
}

More context can be found in conversations under the PR: civo/civo-csi#46



Acceptance criteria:

  1. Update fake client to match the actual API behaviour for ResizeVolume method.

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

No branches or pull requests

1 participant