Skip to content

Commit 9c2d6c0

Browse files
committed
refactor(tests/integration): move to common tests package
1 parent cf90e84 commit 9c2d6c0

13 files changed

Lines changed: 86 additions & 48 deletions

tests/Makefile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
11
test:
22
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
3-
go test -tags integration -timeout 30m -v ./...
3+
go test -tags integration -v -run TestSmoke
44

55
test-smoke:
66
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
7-
go test -tags integration -timeout 10m -short -v ./...
7+
go test -tags integration -short -v -run TestSmoke
8+
9+
test-full:
10+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
11+
go test -tags integration -v -run TestGlobal
12+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
13+
go test -tags integration -v -run TestApps
14+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
15+
go test -tags integration -v -run TestAuth
16+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
17+
go test -tags integration -v -run TestBuilds
18+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
19+
go test -tags integration -v -run TestClusters
20+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
21+
go test -tags integration -v -run TestConfig
22+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
23+
go test -tags integration -v -run TestKeys
24+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
25+
go test -tags integration -v -run TestPerms
26+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
27+
go test -tags integration -v -run TestPs
28+
GOPATH=$(CURDIR)/_vendor:$(GOPATH) \
29+
go test -tags integration -v -run TestReleases
830

931
nuke_from_orbit:
1032
-docker kill `docker ps -q`
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
6+
"testing"
7+
48
"github.com/deis/deis/tests/integration-utils"
59
"github.com/deis/deis/tests/utils"
6-
"testing"
710
)
811

912
func appsSetup(t *testing.T) *itutils.DeisTestConfig {
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
46
"fmt"
7+
"testing"
8+
59
"github.com/deis/deis/tests/integration-utils"
610
"github.com/deis/deis/tests/utils"
7-
"testing"
811
)
912

1013
func authSetup(t *testing.T) *itutils.DeisTestConfig {
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
46
"bytes"
57
"fmt"
6-
"github.com/deis/deis/tests/integration-utils"
7-
"github.com/deis/deis/tests/utils"
88
"os/exec"
99
"strings"
1010
"testing"
1111
"text/template"
12+
13+
"github.com/deis/deis/tests/integration-utils"
14+
"github.com/deis/deis/tests/utils"
1215
)
1316

1417
func buildSetup(t *testing.T) *itutils.DeisTestConfig {
@@ -67,10 +70,6 @@ func buildsCreateTest(t *testing.T, params *itutils.DeisTestConfig) {
6770

6871
}
6972

70-
func appsOpenTest(t *testing.T, params *itutils.DeisTestConfig) {
71-
itutils.Curl(t, params)
72-
}
73-
7473
func TestBuilds(t *testing.T) {
7574
params := buildSetup(t)
7675
buildsListTest(t, params)
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
46
_ "fmt"
5-
"github.com/deis/deis/tests/integration-utils"
67
"testing"
8+
9+
"github.com/deis/deis/tests/integration-utils"
710
)
811

912
func clustersSetup(t *testing.T) *itutils.DeisTestConfig {
@@ -42,7 +45,7 @@ func clustersDestroyTest(t *testing.T, params *itutils.DeisTestConfig) {
4245
itutils.Execute(t, cmd, params, false, "")
4346
}
4447

45-
func TestKeys(t *testing.T) {
48+
func TestClusters(t *testing.T) {
4649
params := clustersSetup(t)
4750
clustersCreateTest(t, params)
4851
clustersListTest(t, params, false)
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
46
_ "fmt"
7+
"testing"
8+
59
"github.com/deis/deis/tests/integration-utils"
610
"github.com/deis/deis/tests/utils"
7-
"testing"
811
)
912

1013
func configSetup(t *testing.T) *itutils.DeisTestConfig {
@@ -47,10 +50,6 @@ func configUnsetTest(t *testing.T, params *itutils.DeisTestConfig) {
4750
itutils.CheckList(t, params, itutils.GetCommand("apps", "info"), "(v4)", false)
4851
}
4952

50-
func appsOpenTest(t *testing.T, params *itutils.DeisTestConfig) {
51-
itutils.Curl(t, params)
52-
}
53-
5453
func TestConfig(t *testing.T) {
5554
params := configSetup(t)
5655
configSetTest(t, params)
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
4-
"github.com/deis/deis/tests/integration-utils"
56
"testing"
7+
8+
"github.com/deis/deis/tests/integration-utils"
69
)
710

811
//Tests #1136 // Tests #1239
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
46
_ "fmt"
5-
"github.com/deis/deis/tests/integration-utils"
67
"testing"
8+
9+
"github.com/deis/deis/tests/integration-utils"
710
)
811

912
func keysSetup(t *testing.T) *itutils.DeisTestConfig {
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
46
_ "fmt"
5-
"github.com/deis/deis/tests/integration-utils"
6-
_ "github.com/deis/deis/tests/utils"
77
"testing"
8+
9+
"github.com/deis/deis/tests/integration-utils"
10+
"github.com/deis/deis/tests/utils"
811
)
912

1013
func permsSetup(t *testing.T) *itutils.DeisTestConfig {
@@ -72,7 +75,7 @@ func permsDeleteAdminTest(t *testing.T, params *itutils.DeisTestConfig) {
7275
itutils.CheckList(t, params, cmd, "test1", true)
7376
}
7477

75-
func TestBuilds(t *testing.T) {
78+
func TestPerms(t *testing.T) {
7679
params := permsSetup(t)
7780
user := itutils.GetGlobalConfig()
7881
user.UserName, user.Password = "test1", "test1"
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
package verbose
1+
// +build integration
2+
3+
package tests
24

35
import (
46
_ "fmt"
7+
"testing"
8+
59
"github.com/deis/deis/tests/integration-utils"
610
"github.com/deis/deis/tests/utils"
7-
"testing"
811
)
912

1013
func psSetup(t *testing.T) *itutils.DeisTestConfig {
@@ -39,7 +42,7 @@ func psScaleTest(t *testing.T, params *itutils.DeisTestConfig) {
3942
itutils.Execute(t, cmd, params, false, "")
4043
}
4144

42-
func TestBuilds(t *testing.T) {
45+
func TestPs(t *testing.T) {
4346
params := psSetup(t)
4447
psScaleTest(t, params)
4548
appsOpenTest(t, params)

0 commit comments

Comments
 (0)