forked from openshift/oc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adm upgrade status
: add fixture test
- Loading branch information
1 parent
b6558a1
commit 57e9844
Showing
5 changed files
with
3,011 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Examples for `oc adm upgrade status` | ||
|
||
Each example consists of two inputs and one output, matched by a common substring: | ||
1. `TESTCASE-cv.yaml`(input): ClusterVersion object (created by `oc get clusterversion version -o yaml`) | ||
2. `TESTCASE-co.yaml`(input): list of ClusterOperators (created by `oc get clusteroperators -o yaml`) | ||
3. `TESTCASE.out`(output): expected output of `oc adm upgrade status` for the two outputs | ||
|
||
The `TestExamples` test in `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: | ||
|
||
```console | ||
$ UPDATE=yes go test -v ./pkg/cli/admin/upgrade/status/... | ||
``` | ||
|
||
You can also pass the inputs to the `oc adm upgrade status` directly: | ||
|
||
``` | ||
$ oc adm upgrade status --mock-clusterversion=not-upgrading-cv.yaml --mock-clusteroperators=not-upgrading-co.yaml | ||
``` |
Oops, something went wrong.