Skip to content

Commit 14a9b9b

Browse files
committed
Added integration directory with integration.go file
1 parent 9f24cf8 commit 14a9b9b

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

test/integration/integration.go

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"os"
6+
7+
et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
8+
"github.com/spf13/cobra"
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"
13+
14+
// If using ginkgo, import your tests here
15+
_ "github.com/openshift/lvm-operator/test/integration"
16+
)
17+
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+
}
53+
}

0 commit comments

Comments
 (0)