Skip to content

Commit 3ad6225

Browse files
authored
Internalize test pkgs (#2148)
Moves the test utils package to internal/ Signed-off-by: Daniel Franz <[email protected]>
1 parent b9b5a7e commit 3ad6225

File tree

13 files changed

+10
-10
lines changed

13 files changed

+10
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ extension-developer-e2e: $(OPERATOR_SDK) $(KUSTOMIZE) #EXHELP Run extension crea
229229
test/extension-developer-e2e/setup.sh $(OPERATOR_SDK) $(CONTAINER_RUNTIME) $(KUSTOMIZE) ${LOCAL_REGISTRY_HOST} ${CLUSTER_REGISTRY_HOST}
230230
go test -count=1 -v ./test/extension-developer-e2e/...
231231

232-
UNIT_TEST_DIRS := $(shell go list ./... | grep -v /test/)
232+
UNIT_TEST_DIRS := $(shell go list ./... | grep -vE "/test/|/testutils")
233233
COVERAGE_UNIT_DIR := $(ROOT_DIR)/coverage/unit
234234

235235
.PHONY: envtest-k8s-bins #HELP Uses setup-envtest to download and install the binaries required to run ENVTEST-test based locally at the project/bin directory.

test/utils/artifacts.go renamed to internal/shared/util/testutils/artifacts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package utils
1+
package testutils
22

33
import (
44
"context"

test/utils/summary.go renamed to internal/shared/util/testutils/summary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package utils
1+
package testutils
22

33
import (
44
"context"

test/utils/utils.go renamed to internal/shared/util/testutils/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package utils
1+
package testutils
22

33
import (
44
"os/exec"

test/e2e/cluster_extension_install_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"sigs.k8s.io/controller-runtime/pkg/client"
2626

2727
ocv1 "github.com/operator-framework/operator-controller/api/v1"
28-
"github.com/operator-framework/operator-controller/test/utils"
28+
utils "github.com/operator-framework/operator-controller/internal/shared/util/testutils"
2929
)
3030

3131
const (

test/e2e/e2e_suite_test.go

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

1717
ocv1 "github.com/operator-framework/operator-controller/api/v1"
1818
"github.com/operator-framework/operator-controller/internal/operator-controller/scheme"
19-
utils "github.com/operator-framework/operator-controller/test/utils"
19+
utils "github.com/operator-framework/operator-controller/internal/shared/util/testutils"
2020
)
2121

2222
var (

test/e2e/metrics_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/stretchr/testify/require"
2626
"k8s.io/apimachinery/pkg/util/rand"
2727

28-
"github.com/operator-framework/operator-controller/test/utils"
28+
utils "github.com/operator-framework/operator-controller/internal/shared/util/testutils"
2929
)
3030

3131
// TestOperatorControllerMetricsExportedEndpoint verifies that the metrics endpoint for the operator controller

0 commit comments

Comments
 (0)