diff --git a/test/framework/clusterctl/repository.go b/test/framework/clusterctl/repository.go index 92119c1d839e..a6061ca227fd 100644 --- a/test/framework/clusterctl/repository.go +++ b/test/framework/clusterctl/repository.go @@ -275,6 +275,9 @@ func getComponentSourceFromURL(ctx context.Context, source ProviderVersionSource if err != nil { return nil, errors.Wrapf(err, "failed to get %s", source.Value) } + if resp.StatusCode != http.StatusOK { + return nil, errors.Errorf("failed to get %s: got status code %d", source.Value, resp.StatusCode) + } defer resp.Body.Close() buf, err = io.ReadAll(resp.Body) if err != nil {