Skip to content

Commit 8926b2d

Browse files
committed
make integration now works with the mobile-core dev-setup openshift
1 parent c5daced commit 8926b2d

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ fmt:
4646
check: errcheck vet fmt test-unit
4747

4848
.PHONY: integration
49-
integration:
50-
go build -o mobile ./cmd/mobile
51-
go test ./integration
49+
integration: build
50+
go test -v ./integration -args -namespace=`oc project -q` -executable=`pwd`/mobile
5251

5352
.PHONY: release
5453
release: setup
55-
goreleaser --rm-dist
54+
goreleaser --rm-dist

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)