Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion test/e2e-ocl/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,12 @@ func cleanupEphemeralBuildObjects(t *testing.T, cs *framework.ClientSet) {
moscList, err := cs.MachineconfigurationV1Interface.MachineOSConfigs().List(context.TODO(), metav1.ListOptions{})
require.NoError(t, err)

kubeassert := helpers.AssertClientSet(t, cs)
// Create a dedicated context for cleanup verification with reasonable timeout.
// Cleanup should complete quickly - if verification takes >2 minutes, something is wrong.
// Use a slower poll interval (3s instead of 1s) to reduce API call rate and avoid rate limiting.
cleanupCtx, cleanupCancel := context.WithTimeout(context.Background(), 2*time.Minute)
defer cleanupCancel()
kubeassert := helpers.AssertClientSet(t, cs).WithContext(cleanupCtx).WithPollInterval(3 * time.Second).Eventually()

if len(secretList.Items) == 0 {
t.Logf("No build-time secrets to clean up")
Expand Down