generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 218
Open
Labels
needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
What would you like to be added:
Consider consolidating the various test utility files currently scattered across test/integration/* and pkg/*/util into a structured, shared testing library (e.g., test/framework).
Current State:
test/integration/util.go: Contains mixed EPP and generic logic.test/integration/epp/util.go: Contains EPP-specific DSLs.test/integration/bbr/util.go: Contains BBR-specific DSLs.- Various other
util.gofiles exist in leaf test packages.
The Problem:
- Discoverability: New contributors often re-implement helper functions because they cannot find the existing ones hidden in specific folders.
- Cyclic Dependencies: As we try to share logic between the EPP suite and the BBR suite, we run into import cycles if the utils are co-located with the tests.
- Maintenance: Updates to the harness logic require touching multiple files across the repo.
Proposed Solution:
Create a dedicated package for test helpers that acts as a comprehensive DSL for the integration suite. This involves:
- Moving generic Kubernetes helpers (Client creation, Object cleanup) to a root test/framework.
- Moving domain-specific helpers (EPP Builders, BBR Builders) to subpackages (e.g. test/framework/epp).
Why is this needed:
- To improve developer velocity by providing a discoverable, documented test DSL.
- To prevent code duplication across the EPP and BBR test suites.
Metadata
Metadata
Assignees
Labels
needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.