Skip to content

Commit 559860d

Browse files
committed
DNM
1 parent 15efd41 commit 559860d

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,19 @@ golangci-lint:
143143
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
144144
$(LOCALBIN)/golangci-lint run --fix
145145

146-
PROCS?=$(shell expr $(shell nproc --ignore 2) / 2)
146+
#PROCS?=$(shell expr $(shell nproc --ignore 2) / 2)
147+
PROCS = 1
147148
PROC_CMD = --procs ${PROCS}
149+
override GOMAXPROCS = 2
150+
override GOMEMLIMIT = 2000MiB
151+
GINKGO_ARGS ?= -v --poll-progress-after=60s --poll-progress-interval=10s
148152

149153
.PHONY: test
150154
test: manifests generate fmt vet envtest ginkgo ## Run tests.
151155
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) -v debug --bin-dir $(LOCALBIN) use $(ENVTEST_K8S_VERSION) -p path)" \
152156
OPERATOR_TEMPLATES="$(PWD)/templates" \
157+
GOMAXPROCS=$(GOMAXPROCS) \
158+
GOMEMLIMIT=$(GOMEMLIMIT) \
153159
$(GINKGO) --trace --cover --coverpkg=../../internal/...,../../api/v1beta1 --coverprofile cover.out --covermode=atomic --randomize-all ${PROC_CMD} $(GINKGO_ARGS) ./test/...
154160

155161
##@ Build

test/functional/base_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
const (
4444
SecretName = "external-secret"
4545
ContainerImage = "test://nova"
46-
timeout = 25 * time.Second
46+
timeout = 45 * time.Second
4747
// have maximum 100 retries before the timeout hits
4848
interval = timeout / 100
4949
// consistencyTimeout is the amount of time we use to repeatedly check

test/functional/suite_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ var _ = BeforeSuite(func() {
9797
logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true), func(o *zap.Options) {
9898
o.Development = true
9999
o.TimeEncoder = zapcore.ISO8601TimeEncoder
100+
// ADD THIS LINE to silence Info/Debug:
101+
o.Level = zapcore.ErrorLevel
100102
}))
101103

102104
ctx, cancel = context.WithCancel(context.TODO())
@@ -127,6 +129,10 @@ var _ = BeforeSuite(func() {
127129
keystoneCRDs,
128130
rabbitCRDs,
129131
},
132+
// Increase this to 60 or 120 seconds for the single-core run
133+
ControlPlaneStartTimeout: 120 * time.Second,
134+
// Give it plenty of time to wind down (e.g., 60-120 seconds)
135+
ControlPlaneStopTimeout: 120 * time.Second,
130136
CRDInstallOptions: envtest.CRDInstallOptions{
131137
Paths: []string{
132138
networkv1CRD,
@@ -140,6 +146,14 @@ var _ = BeforeSuite(func() {
140146
// failing on the colons in ::1
141147
LocalServingHost: "127.0.0.1",
142148
},
149+
ControlPlane: envtest.ControlPlane{
150+
APIServer: &envtest.APIServer{
151+
Args: []string{
152+
"--service-cluster-ip-range=10.0.0.0/12", // 65k+ IPs
153+
"--disable-admission-plugins=ResourceQuota,ServiceAccount,NamespaceLifecycle",
154+
},
155+
},
156+
},
143157
}
144158

145159
// cfg is defined in this file globally.

0 commit comments

Comments
 (0)