HYPERFLEET-404 - test: Add adapter failure testcase#12
Conversation
WalkthroughThis pull request updates test documentation and configuration files for cluster validation testing. The changes include: (1) modifying the cluster creation test case to reference a new payload file location in testdata rather than testcases/templates, (2) adding a new YAML configuration file defining GCP validation adapter settings with Google Pub/Sub broker and validation namespace specifications, and (3) introducing a new test case documentation file that describes the cluster adapter status management scenario with preconditions, test steps, and expected status condition results. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@testcases/cluster_lifecycle.md`:
- Line 680: The comment text "Validation gcp pod is restart" contains
grammatical errors; update that line in testcases/cluster_lifecycle.md to a
corrected phrase such as "Validate GCP pod is restarted" or "Validation: GCP pod
is restarted" (capitalize GCP and use the past participle "restarted") so the
sentence reads clearly.
🧹 Nitpick comments (2)
testcases/cluster_lifecycle.md (2)
621-621: Consider rephrasing the test title for clarity."The adapter's status should work well when its work meets error" is grammatically awkward. A clearer alternative:
-## Test Title: The adapter's status should work well when its work meets error +## Test Title: Adapter status should correctly reflect errors during provisioning
673-676: Markdown list indentation flagged by linter.The static analysis tool flagged indentation issues on these lines. The current indentation (2 spaces) appears intentional for visual grouping under the helm command context, but standard markdown expects 0-space indentation for top-level list items.
If you want to satisfy the linter, remove the leading spaces:
Parameters: - - `RELEASE_NAME`: The deployed HyperFleet release name - - `NAMESPACE_NAME`: The deployed GKE namespace name - - `values.yaml`: Default values file from [hyperfleet-chart/examples/gcp-pubsub/values.yaml](https://github.com/openshift-hyperfleet/hyperfleet-chart/blob/main/examples/gcp-pubsub/values.yaml) +- `RELEASE_NAME`: The deployed HyperFleet release name +- `NAMESPACE_NAME`: The deployed GKE namespace name +- `values.yaml`: Default values file from [hyperfleet-chart/examples/gcp-pubsub/values.yaml](https://github.com/openshift-hyperfleet/hyperfleet-chart/blob/main/examples/gcp-pubsub/values.yaml)Alternatively, if the current style is preferred for readability, you may configure markdownlint to allow this pattern.
9bea82f to
0796821
Compare
0796821 to
4cca52d
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@test-design/testcases/cluster/adapter-statues.md`:
- Around line 1-4: Rename the test file from "adapter-statues.md" to
"adapter-statuses.md" and update any internal references/imports/usages that
point to test-design/testcases/cluster/adapter-statues.md (search for
"adapter-statues" across the repo); ensure the new filename
"adapter-statuses.md" is used in test manifests, README links, and CI/test
runners so references remain consistent.
- Around line 39-44: Update the documentation to use the correct template path:
replace any references to templates/gcp_validation_adapter_values.yaml and
testcases/templates/gcp_validation_adapter_values.yaml with
testdata/payloads/clusters/gcp_validation_adapter_values.yaml and update the
example envsubst command accordingly so it reads envsubst <
testdata/payloads/clusters/gcp_validation_adapter_values.yaml >
values_changed.yaml; ensure both occurrences of the template name in the
markdown (the template reference and the envsubst command) are changed.
- Around line 132-137: Add the missing JSON payload file named
create_cluster_gcp.json under test-design/templates/ containing the GCP cluster
creation payload that matches the API schema used by the tests (fields like
clusterName, region, nodePools, machineType, credentials, etc.); also update the
curl example in adapter-statues.md to reference
templates/create_cluster_gcp.json (replace the incorrect testcases/templates
path) so the command points to test-design/templates/create_cluster_gcp.json and
the test can load the payload correctly.
🧹 Nitpick comments (1)
test-design/testcases/cluster/adapter-statues.md (1)
169-243: JSON example has inconsistent indentation.The closing braces for the
itemsarray and root object at lines 237-242 have inconsistent indentation compared to the opening structure.Proposed fix for JSON formatting
- } - ], - "kind": "AdapterStatusList", - "page": 1, - "size": 2, - "total": 2 - } + } + ], + "kind": "AdapterStatusList", + "page": 1, + "size": 2, + "total": 2 +}
4cca52d to
4eb4e4a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test-design/testcases/cluster/create-cluster.md (1)
36-45: Align the curl payload path with the referenced template path.The command uses
testcases/templates/create_cluster_gcp.json, but the text and link referencetemplates/create_cluster_gcp.json. This inconsistency will break copy/paste usage.🛠️ Proposed fix
-curl -X POST ${API_URL}/api/hyperfleet/v1/clusters \ - -H "Content-Type: application/json" \ - -d `@testcases/templates/create_cluster_gcp.json` +curl -X POST ${API_URL}/api/hyperfleet/v1/clusters \ + -H "Content-Type: application/json" \ + -d `@templates/create_cluster_gcp.json`
🤖 Fix all issues with AI agents
In `@test-design/testcases/cluster/adapter-statues.md`:
- Around line 56-59: The unordered list under the "Parameters:" heading is
indented by two spaces and violates MD007; update the indentation so each list
item is aligned directly under the heading (no extra leading spaces) for the
items `RELEASE_NAME`, `NAMESPACE_NAME`, and `values.yaml`, ensuring the bullets
start at column 0 (or match the heading's expected indentation) to satisfy
markdownlint.
4eb4e4a to
fca0366
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test-design/testcases/cluster/create-cluster.md (1)
37-45: Fix file path inconsistency in cluster creation command.The curl command at line 42 references
gcp_validation_adapter_values.yaml(adapter configuration), but line 45 and the test context indicate this should be usinggcp.json(cluster creation payload). This inconsistency would cause the test to fail or send incorrect data.🔧 Proposed fix
**Action:** -Send POST request to create a new GCP cluster using the payload from [templates/create_cluster_gcp.json](templates/create_cluster_gcp.json): +Send POST request to create a new GCP cluster: ```bash curl -X POST ${API_URL}/api/hyperfleet/v1/clusters \ -H "Content-Type: application/json" \ - -d `@testdata/payloads/clusters/gcp_validation_adapter_values.yaml` + -d `@testdata/payloads/clusters/gcp.json`Payload example: See gcp.json: for the complete cluster creation payload.
</details> </blockquote></details> </blockquote></details>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xueli181114 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1e4f4b2
into
openshift-hyperfleet:main
Summary by CodeRabbit
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.