Skip to content

Commit 016cd7f

Browse files
Merge pull request #416 from stuggi/optimize-envtest-slow-ci
Sync envtest optimization across all operators
2 parents 04a8894 + a789c08 commit 016cd7f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/functional/suite_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ var _ = BeforeSuite(func() {
7070

7171
By("bootstrapping test environment")
7272
testEnv = &envtest.Environment{
73+
// Increase this to 60 or 120 seconds for the single-core run
74+
ControlPlaneStartTimeout: 120 * time.Second,
75+
// Give it plenty of time to wind down (e.g., 60-120 seconds)
76+
ControlPlaneStopTimeout: 120 * time.Second,
7377
CRDDirectoryPaths: []string{
7478
filepath.Join("..", "..", "config", "crd", "bases"),
7579
},
@@ -81,6 +85,14 @@ var _ = BeforeSuite(func() {
8185
// failing on the colons in ::1
8286
LocalServingHost: "127.0.0.1",
8387
},
88+
ControlPlane: envtest.ControlPlane{
89+
APIServer: &envtest.APIServer{
90+
Args: []string{
91+
"--service-cluster-ip-range=10.0.0.0/12", // 65k+ IPs
92+
"--disable-admission-plugins=ResourceQuota,ServiceAccount,NamespaceLifecycle",
93+
},
94+
},
95+
},
8496
}
8597

8698
logger = ctrl.Log.WithName("---Test---")

0 commit comments

Comments
 (0)