Skip to content

Commit 757a01c

Browse files
committed
Added integration directory with integration.go file
1 parent 14a9b9b commit 757a01c

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

test/integration/integration.go

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
package main
22

33
import (
4-
"fmt"
5-
"os"
4+
"fmt"
5+
"os"
66

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"
99

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"
1313

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"
1616
)
1717

1818
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+
}
5353
}

0 commit comments

Comments
 (0)