Skip to content

test: add full e2e tests#83

Merged
isometry merged 3 commits intomainfrom
feature/e2e-tests
Jul 22, 2025
Merged

test: add full e2e tests#83
isometry merged 3 commits intomainfrom
feature/e2e-tests

Conversation

@isometry
Copy link
Copy Markdown
Owner

No description provided.

@isometry isometry requested review from Copilot and pcanilho July 13, 2025 20:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds full end-to-end tests for the GitHub Token Manager using Ginkgo and Kind-based clusters.

  • Extended test utilities with RSA key generation, GitHub token validation, and Kind image loading.
  • Implemented E2E test helpers and comprehensive tests for Token and ClusterToken CRs and Helm chart install/uninstall.
  • Updated internal reconciliation conditions to use 'Ready' status and adjusted Makefile targets.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/utils/utils.go Enhanced command runner and added RSA/GitHub utilities
test/e2e/helpers.go Introduced helper methods for Kubernetes checks
test/e2e/e2e_test.go Added Ginkgo E2E tests for Token and ClusterToken CRs
test/e2e/e2e_suite_test.go Updated suite setup to use consistent GinkgoWriter
internal/tokenmanager/token_secret.go Changed condition type from 'Available' to 'Ready'
api/v1/conditions.go Renamed constant to ConditionTypeReady
Makefile Updated test-e2e target and added KO variable support
Comments suppressed due to low confidence (3)

test/e2e/helpers.go:37

  • [nitpick] Field name 'context' shadows the imported package and can be confusing. Consider renaming it to 'ctx' for clarity and consistency.
	context context.Context

test/e2e/e2e_suite_test.go:33

  • [nitpick] Use ginkgo.GinkgoWriter for consistency with other Ginkgo v2 writes instead of the legacy GinkgoWriter.
	_, _ = fmt.Fprintf(GinkgoWriter, "Starting github-token-manager suite\n")

Makefile:154

  • The '-ginkgo.v' flag is not recognized by 'go test'; either remove it or invoke the Ginkgo CLI directly with 'ginkgo' instead of 'go test'.
	KUBE_CONTEXT=kind-$(KIND_CLUSTER) go test ./test/e2e/ -tags=e2e -v -ginkgo.v

@isometry isometry force-pushed the feature/e2e-tests branch 3 times, most recently from fbbacb9 to 7518bd9 Compare July 22, 2025 12:10
@isometry isometry force-pushed the feature/e2e-tests branch from 7518bd9 to bc24235 Compare July 22, 2025 12:16
@isometry isometry merged commit b6a3592 into main Jul 22, 2025
0 of 2 checks passed
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