From 553dca40f4ac4300c508ba508dcc31ef04e0f56d Mon Sep 17 00:00:00 2001 From: Nicholas Bottari Date: Thu, 2 Jul 2026 14:26:49 -0400 Subject: [PATCH] docs(alerts): add missing inputs for alerts, add new inputs for fg and infra. add more context Signed-off-by: Nicholas Bottari --- .../upgrade/recommend/examples/README.md | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkg/cli/admin/upgrade/recommend/examples/README.md b/pkg/cli/admin/upgrade/recommend/examples/README.md index 6e914e9c08..854b0798d5 100644 --- a/pkg/cli/admin/upgrade/recommend/examples/README.md +++ b/pkg/cli/admin/upgrade/recommend/examples/README.md @@ -1,20 +1,30 @@ # Examples for `oc adm upgrade recommend` -Each example consists of inputs and outputs, matched by a common substring: +Each testcase is anchored by an `xxx-cv.yaml`, where `xxx` is a common substring that identifies the testcase. The `-cv.yaml` file describes the ClusterVersion object essential to the functionality of `oc adm upgrade recommend` -* `TESTCASE-cv.yaml` (input): ClusterVersion object (created by `oc get clusterversion version -o yaml`). Lists are also supported. -* `TESTCASE.output` (output): expected output of `oc adm upgrade recommend`. -* `TESTCASE.show-outdated-releases-output` (output): expected output of `oc adm upgrade recommend --show-outdated-releases`. -* `TESTCASE.version--output` (output): expected output of `oc adm upgrade recommend --to `. +**INPUTS** +--- +* `TESTCASE-cv.yaml`: ClusterVersion object (required, created by `oc get clusterversion version -o yaml`). Lists are also supported. +* `TESTCASE-featuregate.yaml`: FeatureGate object (optional, created by `oc get featuregate cluster -o yaml`). Lists are NOT supported. +* `TESTCASE-infrastructure.yaml`: Infrastructure object (optional, created by `oc get infrastructure cluster -o yaml`). Lists are NOT supported +* `TESTCASE-alerts.json`: Alerts currently present in the cluster (optional, created by `OC_ENABLE_CMD_INSPECT_ALERTS=true oc adm inspect-alerts`) + +**OUTPUTS** +--- +* `TESTCASE.output`: expected output of `oc adm upgrade recommend`. +* `TESTCASE.show-outdated-releases-output`: expected output of `oc adm upgrade recommend --show-outdated-releases`. +* `TESTCASE.version--output`: expected output of `oc adm upgrade recommend --to `. The `TestExamples` test in [`examples_test.go`](../examples_test.go) file above validates all examples. -When the testcase is executed with a non-empty `UPDATE` environmental variable, it will update the `TESTCASE.out` fixture: +**TESTING** +--- +* When the testcase is executed with a non-empty `UPDATE` environmental variable, it will update the `TESTCASE.out` fixture: ```console $ UPDATE=yes go test -v ./pkg/cli/admin/upgrade/recommend/... ``` -You can also pass the inputs to the `oc adm upgrade recommend` directly: +* You can also pass the inputs to the `oc adm upgrade recommend` directly: ```console $ oc adm upgrade recommend --mock-clusterversion=4.14.1-all-recommended-cv.yaml