Skip to content

Commit 936be0c

Browse files
committed
UPSTREAM: <carry>: add support for qe cases
1 parent f7c4bfa commit 936be0c

File tree

68 files changed

+13989
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+13989
-25
lines changed

openshift/tests-extension/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ pkg/bindata/catalog/catalog.go: $(shell find testdata/catalog -type f)
8080
$(GO_BINDATA) -pkg catalog -o $@ -prefix "testdata/catalog" testdata/catalog/...
8181
go fmt ./$(@D)/...
8282

83+
bindata: test/extended/testdata/bindata.go
84+
test/extended/testdata/bindata.go: $(shell find test/extended/testdata -type f ! -name 'bindata.go')
85+
mkdir -p $(@D)
86+
$(GO_BINDATA) -nocompress -nometadata \
87+
-pkg testdata -o $@ -prefix "testextended" \
88+
-ignore "test/extended/testdata/bindata.go" test/extended/testdata/...
89+
gofmt -s -w $@
90+
8391
# GO_COMPLIANCE_POLICY="exempt_all" must only be used for test related binaries.
8492
# It prevents various FIPS compliance policies from being applied to this compilation.
8593
# Do not set globally.

openshift/tests-extension/cmd/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ import (
1717
e "github.com/openshift-eng/openshift-tests-extension/pkg/extension"
1818
et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
1919
g "github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo"
20+
exutil "github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/test/extended/util"
2021
"github.com/spf13/cobra"
2122

22-
"github/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
23-
_ "github/operator-framework-operator-controller/openshift/tests-extension/test"
23+
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
24+
_ "github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/test"
25+
_ "github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/test/extended/olmv1qe"
2426
)
2527

2628
func main() {
@@ -140,6 +142,7 @@ func main() {
140142
// Initialize the environment before running any tests.
141143
specs.AddBeforeAll(func() {
142144
env.Init()
145+
exutil.InitCLusterEnv()
143146
})
144147

145148
ext.AddSpecs(specs)

openshift/tests-extension/pkg/env/cluster.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
olmv1 "github.com/operator-framework/operator-controller/api/v1"
2626

27-
"github/operator-framework-operator-controller/openshift/tests-extension/pkg/extlogs"
27+
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/extlogs"
2828
)
2929

3030
// TestEnv holds the test environment state, including the Kubernetes REST config,
@@ -102,7 +102,7 @@ func initTestEnv() *TestEnv {
102102

103103
version := ""
104104
if isOcp {
105-
extlogs.Infof("[env] Cluster environment initialized (OpenShift: %t)", isOcp)
105+
extlogs.Infof("[env] Cluster environment initialized (OpenShift: %t)\n", isOcp)
106106
version = getOcpVersion(k8sClient)
107107
}
108108

@@ -138,10 +138,10 @@ func getRestConfig() *rest.Config {
138138
if err != nil {
139139
log.Fatalf("Failed to load kubeconfig from %s: %v", kubeconfig, err)
140140
}
141-
extlogs.Infof("[env] Using kubeconfig: %s", kubeconfig)
141+
extlogs.Infof("[env] Using kubeconfig: %s\n", kubeconfig)
142142
return configureQPS(cfg)
143143
}
144-
extlogs.Infof("[env] Using in-cluster configuration: %s", kubeconfig)
144+
extlogs.Infof("[env] Using in-cluster configuration: %s\n", kubeconfig)
145145
cfg, err := rest.InClusterConfig()
146146
if err != nil {
147147
log.Fatalf("Failed to load in-cluster config: %v", err)

openshift/tests-extension/pkg/helpers/catalogs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
olmv1 "github.com/operator-framework/operator-controller/api/v1"
1616

17-
"github/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
17+
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
1818
)
1919

2020
// NewClusterCatalog returns a new ClusterCatalog object.

openshift/tests-extension/pkg/helpers/cluster_catalog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
olmv1 "github.com/operator-framework/operator-controller/api/v1"
1818

19-
"github/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
19+
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
2020
)
2121

2222
// CreateClusterCatalog creates a ClusterCatalog with the specified name and image reference

openshift/tests-extension/pkg/helpers/cluster_extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
olmv1 "github.com/operator-framework/operator-controller/api/v1"
2323

24-
"github/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
24+
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
2525
)
2626

2727
// CreateClusterExtension creates a ServiceAccount, ClusterRoleBinding, and ClusterExtension using typed APIs.

openshift/tests-extension/pkg/helpers/feature_capability.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
configclient "github.com/openshift/client-go/config/clientset/versioned"
1313
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1414

15-
"github/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
16-
"github/operator-framework-operator-controller/openshift/tests-extension/pkg/extlogs"
15+
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
16+
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/extlogs"
1717
)
1818

1919
// RequireOLMv1CapabilityOnOpenshift checks if the OpenShift cluster has
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package extended
2+
3+
// This file exists to make test/extended a valid Go package.
4+
// The actual test cases are in the olmv1qe subdirectory.

0 commit comments

Comments
 (0)