Skip to content

Commit

Permalink
add ListWithGPUs to the fake droplet svc
Browse files Browse the repository at this point in the history
  • Loading branch information
varshavaradarajan committed Nov 18, 2024
1 parent 4036463 commit 76d241a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cloud-controller-manager/do/droplets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (

type fakeDropletService struct {
listFunc func(ctx context.Context, opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error)
listWithGPUsFunc func(ctx context.Context, opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error)
listByTagFunc func(ctx context.Context, tag string, opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error)
listByNameFunc func(ctx context.Context, name string, opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error)
getFunc func(ctx context.Context, dropletID int) (*godo.Droplet, *godo.Response, error)
Expand All @@ -50,6 +51,10 @@ func (f *fakeDropletService) List(ctx context.Context, opt *godo.ListOptions) ([
return f.listFunc(ctx, opt)
}

func (f *fakeDropletService) ListWithGPUs(ctx context.Context, opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error) {
return f.listWithGPUsFunc(ctx, opt)
}

func (f *fakeDropletService) ListByTag(ctx context.Context, tag string, opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error) {
return f.listByTagFunc(ctx, tag, opt)
}
Expand Down

0 comments on commit 76d241a

Please sign in to comment.