Skip to content

Commit f5c1c83

Browse files
committed
cmd: Create minimal cluster-version-operator-tests CLI
Create a minimal cluster-version-operator-tests CLI application, which has no tests. The application will result in a tests extension binary that will extend the openshift-tests binary with CVO tests that will reside in the CVO repository using the openshift-tests-extension [1] framework. Verifying that no tests are present: ```sh $ ./_output/linux/amd64/openshift-tests-extension list null ``` [1]: https://github.com/openshift-eng/openshift-tests-extension
1 parent 4ec8c48 commit f5c1c83

File tree

1 file changed

+31
-0
lines changed
  • cmd/cluster-version-operator-tests

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
"github.com/spf13/cobra"
7+
8+
"github.com/openshift-eng/openshift-tests-extension/pkg/cmd"
9+
"github.com/openshift-eng/openshift-tests-extension/pkg/extension"
10+
"github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
11+
)
12+
13+
func main() {
14+
registry := extension.NewRegistry()
15+
ext := extension.NewExtension("openshift", "payload", "cluster-version-operator")
16+
17+
var specs extensiontests.ExtensionTestSpecs
18+
ext.AddSpecs(specs)
19+
registry.Register(ext)
20+
21+
root := &cobra.Command{
22+
Long: "OpenShift Tests Extension for Cluster Version Operator",
23+
}
24+
root.AddCommand(cmd.DefaultExtensionCommands(registry)...)
25+
26+
if err := func() error {
27+
return root.Execute()
28+
}(); err != nil {
29+
os.Exit(1)
30+
}
31+
}

0 commit comments

Comments
 (0)