Fix integration tests - #14
Merged
Merged
Conversation
anekkanti
reviewed
Feb 18, 2026
| for _, ns := range namespacesToClean { | ||
| // AIDEV-NOTE: Only delete namespaces that are in ACTIVE state (value 3). | ||
| // Namespaces in other states (DELETING, DELETED, etc.) cannot be deleted. | ||
| if ns.State != resource.ResourceState_RESOURCE_STATE_ACTIVE { |
Member
There was a problem hiding this comment.
I wonder if its better for the test to fail when a namespace is left in non-active state. I would hate to leak namespaces in the test account.
Ideally the test should clean up all the namespaces it creates, else its a bug that needs fixing.
Collaborator
Author
There was a problem hiding this comment.
Good callout, I'll address this in a follow up PR
anekkanti
approved these changes
Feb 18, 2026
anekkanti
left a comment
Member
There was a problem hiding this comment.
One comment, but otherwise lgtm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Why?
The poller update addresses a cursor comment: #9 (comment)
Checklist
Closes
How was this tested:
Note
Medium Risk
Touches shared async-operation polling and its error/printing behavior, which can affect CLI output and exit codes for multiple commands; test changes are low impact but the
Makefileenv handling change may alter local dev expectations.Overview
Integration tests are stabilized by reusing the production async-operation polling logic:
pollAsyncOperationis promoted to exportedPollAsyncOperation, all namespace commands call it, and it now returns an error on FAILED/CANCELLED/REJECTED after emitting the structuredMutationResultso the CLI exits non-zero while preserving JSON output.Test cleanup is hardened by skipping deletion of non-ACTIVE namespaces, and the test suite’s polling helper is simplified to a thin wrapper around
PollAsyncOperationwith output discarded. TheMakefilealso stops parsing.envand instead exports all variables, relying on the environment for values.Written by Cursor Bugbot for commit c884b5b. This will update automatically on new commits. Configure here.