1
1
package main
2
2
3
3
import (
4
- "fmt"
5
- "os"
4
+ "fmt"
5
+ "os"
6
6
7
- et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
8
- "github.com/spf13/cobra"
7
+ et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
8
+ "github.com/spf13/cobra"
9
9
10
- "github.com/openshift-eng/openshift-tests-extension/pkg/cmd"
11
- e "github.com/openshift-eng/openshift-tests-extension/pkg/extension"
12
- g "github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo"
10
+ "github.com/openshift-eng/openshift-tests-extension/pkg/cmd"
11
+ e "github.com/openshift-eng/openshift-tests-extension/pkg/extension"
12
+ g "github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo"
13
13
14
- // If using ginkgo, import your tests here
15
- _ "github.com/openshift/lvm-operator/test/integration"
14
+ // If using ginkgo, import your tests here
15
+ _ "github.com/openshift/lvm-operator/test/integration"
16
16
)
17
17
18
18
func main () {
19
- // Extension registry
20
- registry := e .NewRegistry ()
21
-
22
- // You can declare multiple extensions, but most people will probably only need to create one.
23
- ext := e .NewExtension ("openshift" , "payload" , "lvm-operator" )
24
-
25
- // all test cases
26
- ext .AddSuite (e.Suite {
27
- Name : "openshift/lvm-operator/test" ,
28
- Parents : []string {},
29
- })
30
-
31
- // If using Ginkgo, build test specs automatically
32
- specs , err := g .BuildExtensionTestSpecsFromOpenShiftGinkgoSuite ()
33
- if err != nil {
34
- panic (fmt .Sprintf ("couldn't build extension test specs from ginkgo: %+v" , err .Error ()))
35
- }
36
-
37
- ext .AddSpecs (specs )
38
- registry .Register (ext )
39
-
40
- root := & cobra.Command {
41
- Long : "LVM Test Suite (OTE Based)" ,
42
- }
43
-
44
- root .AddCommand (
45
- cmd .DefaultExtensionCommands (registry )... ,
46
- )
47
-
48
- if err := func () error {
49
- return root .Execute ()
50
- }(); err != nil {
51
- os .Exit (1 )
52
- }
19
+ // Extension registry
20
+ registry := e .NewRegistry ()
21
+
22
+ // You can declare multiple extensions, but most people will probably only need to create one.
23
+ ext := e .NewExtension ("openshift" , "payload" , "lvm-operator" )
24
+
25
+ // all test cases
26
+ ext .AddSuite (e.Suite {
27
+ Name : "openshift/lvm-operator/test" ,
28
+ Parents : []string {},
29
+ })
30
+
31
+ // If using Ginkgo, build test specs automatically
32
+ specs , err := g .BuildExtensionTestSpecsFromOpenShiftGinkgoSuite ()
33
+ if err != nil {
34
+ panic (fmt .Sprintf ("couldn't build extension test specs from ginkgo: %+v" , err .Error ()))
35
+ }
36
+
37
+ ext .AddSpecs (specs )
38
+ registry .Register (ext )
39
+
40
+ root := & cobra.Command {
41
+ Long : "LVM Test Suite (OTE Based)" ,
42
+ }
43
+
44
+ root .AddCommand (
45
+ cmd .DefaultExtensionCommands (registry )... ,
46
+ )
47
+
48
+ if err := func () error {
49
+ return root .Execute ()
50
+ }(); err != nil {
51
+ os .Exit (1 )
52
+ }
53
53
}
0 commit comments