Skip to content

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

Open
vak-rashu wants to merge 23 commits intoprashanthjos:mainfrom
vak-rashu:add/e2e-test
Open

feat(e2e): add end-to-end tests for kflashback operator#9
vak-rashu wants to merge 23 commits intoprashanthjos:mainfrom
vak-rashu:add/e2e-test

Conversation

@vak-rashu
Copy link
Copy Markdown

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
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.

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