Skip to content

Conversation

@zelihacagip
Copy link
Contributor

Added KGB API check
Added a check for existing pods in the namespace is always enforced.

  1. E2E Test Configuration : Added KGB_API_URL: http://localhost:9999 for test mode.
  2. Operator Code (project-operator.go):
    Skipped the KGB API check when running in test mode
    (i.e., when the URL is localhost:9999 or empty).
    Added an informational log when the check is skipped.
    This allows the tests to run without requiring a real KGB API.
  3. E2E Tests (e2e_test.go)
    Added a verification ensuring the namespace has no pods before deletion.
    Added a check ensuring deletion is blocked when pods exist in the namespace.
    Added a verification ensuring the namespace has no pods before deletion.

- Add KGB_API_URL to test configmap (test mode with localhost:9999)
- Skip KGB API check in test mode to avoid connection errors
- Add test to verify project deletion is blocked when pods exist
- Add check to ensure no pods exist before attempting deletion
- Update test descriptions to reflect new deletion conditions
@zelihacagip zelihacagip requested a review from jfhcagip January 8, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants