diff --git a/client/buildpack.go b/client/buildpack.go index df0c840..ebf57a5 100644 --- a/client/buildpack.go +++ b/client/buildpack.go @@ -40,10 +40,9 @@ func (c *BuildpackClient) Create(ctx context.Context, r *resource.BuildpackCreat return &bp, nil } -// Delete the specified buildpack -func (c *BuildpackClient) Delete(ctx context.Context, guid string) error { - _, err := c.client.delete(ctx, path.Format("/v3/buildpacks/%s", guid)) - return err +// Delete the specified buildpack returning the async deletion jobGUID +func (c *BuildpackClient) Delete(ctx context.Context, guid string) (string, error) { + return c.client.delete(ctx, path.Format("/v3/buildpacks/%s", guid)) } // First returns the first buildpack matching the options or an error when less than 1 match diff --git a/client/buildpack_test.go b/client/buildpack_test.go index 32ac461..d95a8db 100644 --- a/client/buildpack_test.go +++ b/client/buildpack_test.go @@ -51,7 +51,7 @@ func TestBuildpacks(t *testing.T) { Status: http.StatusAccepted, }, Action: func(c *Client, t *testing.T) (any, error) { - return nil, c.Buildpacks.Delete(context.Background(), "6f3c68d0-e119-4ca2-8ce4-83661ad6e0eb") + return c.Buildpacks.Delete(context.Background(), "6f3c68d0-e119-4ca2-8ce4-83661ad6e0eb") }, }, {