Skip to content

Commit

Permalink
fix scorecard tests for v4 API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaron committed Oct 4, 2024
1 parent fb58f1f commit fa2e9cc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ metadata:
capabilities: Seamless Upgrades
categories: Monitoring, Developer Tools
containerImage: quay.io/cryostat/cryostat-operator:4.0.0-dev
createdAt: "2024-09-20T20:29:31Z"
createdAt: "2024-10-04T18:55:09Z"
description: JVM monitoring and profiling tool
operatorframework.io/initialization-resource: |-
{
Expand Down
12 changes: 6 additions & 6 deletions bundle/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- operator-install
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220
labels:
suite: cryostat
test: operator-install
Expand All @@ -80,7 +80,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-cr
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220
labels:
suite: cryostat
test: cryostat-cr
Expand All @@ -90,7 +90,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-multi-namespace
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220
labels:
suite: cryostat
test: cryostat-multi-namespace
Expand All @@ -100,7 +100,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-recording
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220
labels:
suite: cryostat
test: cryostat-recording
Expand All @@ -110,7 +110,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-config-change
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220
labels:
suite: cryostat
test: cryostat-config-change
Expand All @@ -120,7 +120,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-report
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220
labels:
suite: cryostat
test: cryostat-report
Expand Down
12 changes: 6 additions & 6 deletions config/scorecard/patches/custom.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
entrypoint:
- cryostat-scorecard-tests
- operator-install
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220"
labels:
suite: cryostat
test: operator-install
Expand All @@ -18,7 +18,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-cr
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220"
labels:
suite: cryostat
test: cryostat-cr
Expand All @@ -28,7 +28,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-multi-namespace
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220"
labels:
suite: cryostat
test: cryostat-multi-namespace
Expand All @@ -38,7 +38,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-recording
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220"
labels:
suite: cryostat
test: cryostat-recording
Expand All @@ -48,7 +48,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-config-change
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220"
labels:
suite: cryostat
test: cryostat-config-change
Expand All @@ -58,7 +58,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-report
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20240911172313"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241004185220"
labels:
suite: cryostat
test: cryostat-report
4 changes: 2 additions & 2 deletions internal/test/scorecard/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ func (client *TargetClient) Create(ctx context.Context, options *Target) (*Targe
return nil, fmt.Errorf("API request failed with status code: %d, response body: %s, and headers:\n%s", resp.StatusCode, ReadError(resp), ReadHeader(resp))
}

targetResp := &CustomTargetResponse{}
targetResp := &Target{}
err = ReadJSON(resp, targetResp)
if err != nil {
return nil, fmt.Errorf("failed to read response body: %s", err.Error())
}

return targetResp.Data.Result, nil
return targetResp, nil
}

// Client for Cryostat Recording resources
Expand Down
6 changes: 0 additions & 6 deletions internal/test/scorecard/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ type Archive struct {
Size uint32 `json:"size"`
}

type CustomTargetResponse struct {
Data struct {
Result *Target `json:"result"`
} `json:"data"`
}

type Target struct {
Id uint32 `json:"id,omitempty"`
ConnectUrl string `json:"connectUrl"`
Expand Down

0 comments on commit fa2e9cc

Please sign in to comment.