Skip to content

feat(e2e): add end-to-end tests for kflashback operator#9

Merged
prashanthjos merged 23 commits into
prashanthjos:mainfrom
vak-rashu:add/e2e-test
May 25, 2026
Merged

feat(e2e): add end-to-end tests for kflashback operator#9
prashanthjos merged 23 commits into
prashanthjos:mainfrom
vak-rashu:add/e2e-test

Conversation

@vak-rashu
Copy link
Copy Markdown
Contributor

What these tests do:

  • Spins up a real KinD cluster with the kflashback controller deployment
  • Supports two storage backends via STORAGE_BACKEND env var (sqlite, postgresql)
    • SQLite: deploys controller with PVC-backed storage
    • PostgreSQL: deploys a Postgres instance inside KinD, creates credentials secret, deploys controller
  • Creates a "test-app" Deployment in the default namespace
  • Updates the deployment twice (image change + replica scaling)
  • Verifies changes via the reconstruct API endpoint (/api/v1/resources/{uid}/reconstruct/{revision})
  • Asserts reconstructed state matches expected image and replica count at each revision

CI changes:

  • Added two parallel e2e jobs (e2e-sqlite, e2e-postgresql) that run on push to main
  • Both jobs run after go, docker, integration, manifests and ui jobs pass

Further tests planned:

  • spec.paused — verify tracking stops when policy is paused
  • spec.retention.maxAge and spec.retention.maxRevisions to verify old revisions are purged correctly

Comment thread .github/workflows/ci.yaml Outdated
steps:
- uses: actions/checkout@v4

- name: Pull KinD Node image
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

NIT: KinD --> Kind

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated the workflow naming.

@prashanthjos prashanthjos merged commit 165f71f into prashanthjos:main May 25, 2026
3 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