Skip to content

Commit f832579

Browse files
committed
make integration now works with the mobile-core dev-setup openshift
1 parent f01934a commit f832579

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@ fmt:
4444
check: errcheck vet fmt test-unit
4545

4646
.PHONY: integration
47-
integration:
48-
go build -o mobile ./cmd/mobile
49-
go test ./integration
47+
integration: build
48+
go test -v ./integration -args -namespace=`oc project -q` -executable=`pwd`/mobile

integration/client_crudl_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestClientJson(t *testing.T) {
6464
m.Args("get", "client", expectedId).Should(notExists).Run().Test(t)
6565
o.Args("get", "mobileclient", expectedId).Should(notExists).Run().Test(t)
6666
m.Args("create", "client", name, clientType).Should(exists).Run().Test(t)
67-
m.Args("get", "client", expectedId).Should(exists).Run(t).Run().Test(t)
67+
m.Args("get", "client", expectedId).Should(exists).Run().Test(t)
6868
o.Args("get", "mobileclient", expectedId).Should(exists).Run().Test(t)
6969
m.Args("delete", "client", expectedId).Should(NoErr).Run().Test(t)
7070
m.Args("get", "client", expectedId).Should(notExists).Run().Test(t)

integration/flags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import (
55
)
66

77
var namespace = flag.String("namespace", "", "Openshift namespace (most often Project) to run our integration tests in")
8-
var prefix = flag.String("prefix", "", "Client name to be created")
8+
var prefix = flag.String("prefix", "test", "Client name to be created")
99
var executable = flag.String("executable", "", "Executable under test")
1010
var update = flag.Bool("update", false, "update golden files")

integration/validatedCommandUtils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type ValidationResult struct {
1515
}
1616

1717
func (v ValidationResult) Test(t *testing.T) (output []byte, err error) {
18-
t.Log(fmt.Sprintf("%s\n", output))
18+
t.Log(fmt.Sprintf("%s\n", v.Output))
1919
if !v.Success {
2020
t.Fatal(v.Message)
2121
}

0 commit comments

Comments
 (0)