Skip to content

Add tests for cluster configuration, command execution, and ArgoCD in…#35

Merged
rumstead merged 2 commits into
mainfrom
feat/upgrade
Jul 5, 2026
Merged

Add tests for cluster configuration, command execution, and ArgoCD in…#35
rumstead merged 2 commits into
mainfrom
feat/upgrade

Conversation

@rumstead

@rumstead rumstead commented Jul 5, 2026

Copy link
Copy Markdown
Owner

…tegration

  • Introduced unit tests for RequestClusters unmarshalling from YAML and JSON formats.
  • Updated schema.json to simplify validation for volumes, envs, labels, and annotations.
  • Refactored command execution to capture stdout more efficiently.
  • Added tests for command execution, including capturing stdout and handling errors.
  • Enhanced ArgoCD deployment logic to use context for command execution and improved error handling.
  • Added tests for ArgoCD agent functionalities, including generating arguments and replacing cluster URLs.
  • Improved K3D cluster creation logic and added tests for argument parsing.
  • Added tests for random string generation utility.

…tegration

- Introduced unit tests for RequestClusters unmarshalling from YAML and JSON formats.
- Updated schema.json to simplify validation for volumes, envs, labels, and annotations.
- Refactored command execution to capture stdout more efficiently.
- Added tests for command execution, including capturing stdout and handling errors.
- Enhanced ArgoCD deployment logic to use context for command execution and improved error handling.
- Added tests for ArgoCD agent functionalities, including generating arguments and replacing cluster URLs.
- Improved K3D cluster creation logic and added tests for argument parsing.
- Added tests for random string generation utility.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR strengthens the repo’s reliability and release automation by adding new unit tests across several packages, improving command execution and ArgoCD integration behavior, updating the JSON schema, and modernizing CI/release workflows and Go module dependencies.

Changes:

  • Added unit tests for random utilities, k3d argument parsing, ArgoCD helper functions, and cluster config unmarshalling.
  • Refactored command stdout capture and updated ArgoCD command execution to use contexts more consistently.
  • Updated schema generation and modernized project automation (Go module/deps updates, new CI workflow, GoReleaser workflows, Dependabot).

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/random/random_test.go Adds tests validating random string length and allowed charset.
pkg/kubernetes/k3d/k3d.go Improves path handling and cluster creation flow; simplifies arg pass-through.
pkg/kubernetes/k3d/k3d_test.go Adds coverage for k3d cluster create argument generation.
pkg/gitops/argocd/argocd.go Uses context-aware exec in more places; improves env restore handling; adjusts cluster add wiring.
pkg/gitops/argocd/argocd_test.go Adds tests for arg generation, kubeconfig URL replacement, and bind address selection.
pkg/exec/exec.go Refactors stdout capture to buffer-based approach.
pkg/exec/exec_test.go Adds tests for command mapping and stdout/error behavior.
pkg/config/v1alpha1/schema.json Simplifies object validation for volumes/envs/labels/annotations.
pkg/config/v1alpha1/cluster_config_test.go Adds tests for YAML/JSON unmarshalling of cluster configs.
go.sum Updates dependency checksums after module upgrades/tidy.
go.mod Bumps Go version and updates direct/indirect dependencies.
cmd/clusters/clusters.go Uses filepath-safe paths, safer cleanup, and ensures gitops ops run with timeout context.
.goreleaser.yaml Updates config for GoReleaser v2 and snapshot templating.
.github/workflows/go_releaser_tags.yml Modernizes tag release workflow (pinned actions, go-version-file, GoReleaser v2).
.github/workflows/go_releaser_branches.yml Modernizes snapshot workflow for branches (pinned actions, go-version-file, GoReleaser v2).
.github/workflows/ci.yml Adds CI for build/vet/test, tidy checks, and schema regeneration checks.
.github/dependabot.yml Enables weekly dependency updates for Go modules and GitHub Actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/gitops/argocd/argocd.go
Comment thread pkg/gitops/argocd/argocd.go Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rumstead rumstead merged commit 1d2744c into main Jul 5, 2026
3 checks passed
@rumstead rumstead deleted the feat/upgrade branch July 5, 2026 15:56
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