forked from openshift/cluster-version-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
58 lines (47 loc) · 1.84 KB
/
main.go
File metadata and controls
58 lines (47 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package main
import (
"fmt"
"os"
"github.com/spf13/cobra"
"github.com/openshift-eng/openshift-tests-extension/pkg/cmd"
"github.com/openshift-eng/openshift-tests-extension/pkg/extension"
g "github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo"
_ "github.com/openshift/cluster-version-operator/test/cvo"
)
func main() {
registry := extension.NewRegistry()
ext := extension.NewExtension("openshift", "payload", "cluster-version-operator")
// Parallel tests must be able to run alongside any other test, and not be disruptive to the cluster’s normal operation.
// Tests should be as fast as possible; and less than 5 minutes in duration -- and typically much shorter.
// Longer tests need approval from the OCP architects.
ext.AddSuite(extension.Suite{
Name: "openshift/cluster-version-operator/conformance/parallel",
Parents: []string{"openshift/conformance/parallel"},
Qualifiers: []string{
`!(name.contains("[Serial]") || "Serial" in labels || name.contains("[Slow]") || "Local" in labels)`,
},
})
// Serial tests run in isolation, however they must return the cluster to its original state upon exiting.
ext.AddSuite(extension.Suite{
Name: "openshift/cluster-version-operator/conformance/serial",
Parents: []string{"openshift/conformance/serial"},
Qualifiers: []string{
`(name.contains("[Serial]") || "Serial" in labels) && !("Local" in labels)`,
},
})
specs, err := g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
if err != nil {
panic(fmt.Sprintf("couldn't build extension test specs from ginkgo: %+v", err.Error()))
}
ext.AddSpecs(specs)
registry.Register(ext)
root := &cobra.Command{
Long: "OpenShift Tests Extension for Cluster Version Operator",
}
root.AddCommand(cmd.DefaultExtensionCommands(registry)...)
if err := func() error {
return root.Execute()
}(); err != nil {
os.Exit(1)
}
}