mirror of https://github.com/kubevela/kubevela.git
move e2e test folder in case those test suites are triggerred by unit-test
This commit is contained in:
parent
bc0c15988c
commit
a0177272d0
2
Makefile
2
Makefile
|
|
@ -45,7 +45,7 @@ e2e-setup:
|
|||
|
||||
e2e-test:
|
||||
# Run e2e test
|
||||
ginkgo -v -r pkg/test
|
||||
ginkgo -v -r e2e
|
||||
|
||||
e2e-cleanup:
|
||||
# Clean up
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package test
|
||||
package e2e
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
|
@ -20,7 +20,7 @@ func GetCliBinary() (string, error) {
|
|||
// TODO(zzxwill) Need to check before building from scratch every time
|
||||
cwd, _ := os.Getwd()
|
||||
rudrPath = path.Join(cwd, "..")
|
||||
mainPath := path.Join(rudrPath, "../../cmd/rudrx/main.go")
|
||||
mainPath := path.Join(rudrPath, "../cmd/rudrx/main.go")
|
||||
cmd := exec.Command("go", "build", "-o", path.Join(rudrPath, "rudr"), mainPath)
|
||||
|
||||
_, err := cmd.Output()
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package component
|
||||
package e2e
|
||||
|
||||
import (
|
||||
"github.com/cloud-native-application/rudrx/e2e"
|
||||
"testing"
|
||||
|
||||
"github.com/cloud-native-application/rudrx/pkg/test"
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/onsi/gomega"
|
||||
)
|
||||
|
|
@ -11,7 +11,7 @@ import (
|
|||
var rudrPath string
|
||||
|
||||
var _ = ginkgo.BeforeSuite(func() {
|
||||
p, err := test.GetCliBinary()
|
||||
p, err := e2e.GetCliBinary()
|
||||
rudrPath = p
|
||||
gomega.Expect(err).NotTo(gomega.HaveOccurred())
|
||||
})
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
package component
|
||||
package e2e
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
rudr "github.com/cloud-native-application/rudrx/pkg/test"
|
||||
"github.com/cloud-native-application/rudrx/e2e"
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/onsi/gomega"
|
||||
)
|
||||
|
|
@ -16,7 +15,7 @@ var _ = ginkgo.Describe("Component", func() {
|
|||
ginkgo.Context("run", func() {
|
||||
ginkgo.It("should print successful creation information", func() {
|
||||
cli := fmt.Sprintf("rudr containerized:run %s -p 80 --image nginx:1.9.4", applicationName)
|
||||
output, err := rudr.Exec(cli)
|
||||
output, err := e2e.Exec(cli)
|
||||
gomega.Expect(err).NotTo(gomega.HaveOccurred())
|
||||
gomega.Expect(output).To(gomega.ContainSubstring("SUCCEED"))
|
||||
})
|
||||
|
|
@ -25,7 +24,7 @@ var _ = ginkgo.Describe("Component", func() {
|
|||
ginkgo.Context("delete", func() {
|
||||
ginkgo.It("should print successful deletion information", func() {
|
||||
cli := fmt.Sprintf("rudr delete %s", applicationName)
|
||||
output, err := rudr.Exec(cli)
|
||||
output, err := e2e.Exec(cli)
|
||||
gomega.Expect(err).NotTo(gomega.HaveOccurred())
|
||||
gomega.Expect(output).To(gomega.ContainSubstring("DELETE SUCCEED"))
|
||||
})
|
||||
Loading…
Reference in New Issue