Skip to content

Commit 44af2dd

Browse files
Merge pull request openshift#225 from meowfaceman/SDCICD-163
SDCICD-163. Make cluster image set tests work.
2 parents ab89b56 + 6a3ae98 commit 44af2dd

File tree

3 files changed

+17
-27
lines changed

3 files changed

+17
-27
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ ADDONS_PKG := $(PKG)/suites/addons
55
E2E_PKG := $(PKG)/suites/e2e
66
SCALE_PKG := $(PKG)/suites/scale
77
DOC_PKG := $(PKG)/cmd/osde2e-docs
8+
MIDDLE_IMAGESETS_PKG := $(PKG)/suites/clusterimagesets/middle
9+
OLDEST_IMAGESETS_PKG := $(PKG)/suites/clusterimagesets/oldest
810

911
DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
1012

@@ -50,10 +52,10 @@ test-addons:
5052
go test $(ADDONS_PKG) -test.v -ginkgo.skip="$(GINKGO_SKIP)" -ginkgo.focus="$(GINKGO_FOCUS)" -test.timeout 8h -test.run TestAddons -e2e-config=$(E2ECONFIG)
5153

5254
test-middle-imageset:
53-
go test $(ADDONS_PKG) -test.v -ginkgo.skip="$(GINKGO_SKIP)" -ginkgo.focus="$(GINKGO_FOCUS)" -test.timeout 8h -test.run TestMiddleImageSet -e2e-config=$(E2ECONFIG)
55+
go test $(MIDDLE_IMAGESETS_PKG) -test.v -ginkgo.skip="$(GINKGO_SKIP)" -ginkgo.focus="$(GINKGO_FOCUS)" -test.timeout 8h -test.run TestMiddleImageSet -e2e-config=$(E2ECONFIG)
5456

5557
test-oldest-imageset:
56-
go test $(ADDONS_PKG) -test.v -ginkgo.skip="$(GINKGO_SKIP)" -ginkgo.focus="$(GINKGO_FOCUS)" -test.timeout 8h -test.run TestOldestImageSet -e2e-config=$(E2ECONFIG)
58+
go test $(OLDEST_IMAGESETS_PKG) -test.v -ginkgo.skip="$(GINKGO_SKIP)" -ginkgo.focus="$(GINKGO_FOCUS)" -test.timeout 8h -test.run TestOldestImageSet -e2e-config=$(E2ECONFIG)
5759

5860
test-docker:
5961
$(CONTAINER_ENGINE) run \

suites/clusterimagesets/imagesets_test.go renamed to suites/clusterimagesets/middle/imagesets_test.go

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ import (
77
"github.com/openshift/osde2e/common"
88
"github.com/openshift/osde2e/pkg/config"
99
"github.com/openshift/osde2e/pkg/state"
10+
1011
// import suites to be tested
12+
_ "github.com/openshift/osde2e/test/openshift"
13+
_ "github.com/openshift/osde2e/test/operators"
14+
_ "github.com/openshift/osde2e/test/state"
15+
_ "github.com/openshift/osde2e/test/verify"
16+
_ "github.com/openshift/osde2e/test/workloads/guestbook"
1117
)
1218

1319
func TestMiddleImageSet(t *testing.T) {
@@ -35,27 +41,3 @@ func TestMiddleImageSet(t *testing.T) {
3541
}
3642
}
3743
}
38-
39-
func TestOldestImageSet(t *testing.T) {
40-
// force overwriting the attributes to make sure the cluster with the specified version will be created.
41-
cfg := config.Instance
42-
state := state.Instance
43-
44-
cfg.Kubeconfig.Path = ""
45-
cfg.Cluster.DestroyAfterTest = true
46-
state.Cluster.ID = ""
47-
state.Cluster.Version = ""
48-
49-
versionList, err := common.GetEnabledNoDefaultVersions()
50-
if err != nil {
51-
log.Printf("Failed to do clusterImageSets testing: %+v\n", err)
52-
} else {
53-
if len(versionList) == 0 {
54-
log.Printf("Skip doing clusterImageSets testing: Default version is covered by the regular testing\n")
55-
} else {
56-
log.Printf("Start doing clusterImageSets testing with the specified version %+v\n", versionList[0])
57-
state.Cluster.Version = versionList[0]
58-
common.RunE2ETests(t)
59-
}
60-
}
61-
}

suites/clusterimagesets/oldest/imagesets_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ import (
77
"github.com/openshift/osde2e/common"
88
"github.com/openshift/osde2e/pkg/config"
99
"github.com/openshift/osde2e/pkg/state"
10+
1011
// import suites to be tested
12+
_ "github.com/openshift/osde2e/test/openshift"
13+
_ "github.com/openshift/osde2e/test/operators"
14+
_ "github.com/openshift/osde2e/test/state"
15+
_ "github.com/openshift/osde2e/test/verify"
16+
_ "github.com/openshift/osde2e/test/workloads/guestbook"
1117
)
1218

13-
func TestE2E(t *testing.T) {
19+
func TestOldestImageSet(t *testing.T) {
1420
// force overwriting the attributes to make sure the cluster with the specified version will be created.
1521
cfg := config.Instance
1622
state := state.Instance

0 commit comments

Comments
 (0)