Skip to content

test(ci): container image smoke test via testcontainers#218

Open
Prarthana124 wants to merge 1 commit into
optiqor:mainfrom
Prarthana124:feat/docker-image-integration-test
Open

test(ci): container image smoke test via testcontainers#218
Prarthana124 wants to merge 1 commit into
optiqor:mainfrom
Prarthana124:feat/docker-image-integration-test

Conversation

@Prarthana124

Copy link
Copy Markdown

What

Adds a Docker image integration smoke test using testcontainers.

The test builds and runs the freshly built Docker image and verifies:

  • Container starts successfully
  • kerno version executes correctly
  • kerno --help exits successfully
  • Container lifecycle is handled cleanly

Why

The Docker CI job currently builds the image but does not verify that the image can actually run.
This integration test helps catch broken entrypoints, missing binaries, and invalid default commands before release.
Fixes #147

How

  • Added a new integration test in internal/integration/container_smoke_test.go
  • Uses testcontainers-go to run the freshly built Docker image
  • Verifies container startup and basic CLI commands
  • Ensures the container exits and cleans up correctly

Testing

  • go build ./... passes
  • go test ./... passes
  • go vet ./... passes
  • golangci-lint run ./... passes
  • Tested locally with:
  • N/A — pure docs/refactor
  • sudo ./bin/bpf-verify --read 5s confirms 6/6 programs still load
  • ./scripts/verify.sh passes (or specific phase: ./scripts/verify.sh quality)

Checklist

  • PR title follows Conventional Commits (feat(scope): subject)
  • All commits are DCO-signed (git commit -s)
  • No unrelated changes pulled in
  • Documentation updated where user-visible behavior changed
  • Added/updated tests for new code paths
  • If a new doctor rule, paired with a chaos scenario in scripts/verify.sh

@Prarthana124 Prarthana124 requested a review from btwshivam as a code owner June 12, 2026 12:56
@github-actions github-actions Bot added the level:advanced 200+ lines or 6+ files (auto-applied) label Jun 12, 2026
@github-actions

Copy link
Copy Markdown

🚀 First PR — welcome aboard!

A few things to expect:

  1. CI: every PR runs build + race tests + lint + (eventually) the kernel matrix. If something fails, the log will tell you exactly which gate.
  2. DCO: every commit needs Signed-off-by:git commit -s adds it automatically.
  3. Conventional Commits: PR titles like feat(doctor): add new rule or fix(bpf): handle X. We squash-merge by default.
  4. Review: a maintainer will review within 72 hours. Suggestions are conversations, not orders — push back if something doesn't fit your context.

If you get stuck, reply here or jump to Discussions. We want this PR to land.

@github-actions github-actions Bot added testing Tests and test coverage and removed level:advanced 200+ lines or 6+ files (auto-applied) labels Jun 12, 2026
@Prarthana124 Prarthana124 force-pushed the feat/docker-image-integration-test branch from cde7a0e to 1c82e2e Compare June 12, 2026 13:06
@github-actions github-actions Bot added the level:advanced 200+ lines or 6+ files (auto-applied) label Jun 12, 2026
@Prarthana124 Prarthana124 force-pushed the feat/docker-image-integration-test branch 2 times, most recently from 6bf9795 to bbaaa08 Compare June 12, 2026 13:37
Signed-off-by: Prarthana <pprarthana164@gmail.com>
Signed-off-by: Prarthana124 <pprarthana164@gmail.com>
Signed-off-by: Prarthana <pprarthana164@gmail.com>
Signed-off-by: Prarthana124 <pprarthana164@gmail.com>
@Prarthana124 Prarthana124 force-pushed the feat/docker-image-integration-test branch from bbaaa08 to 4bd462c Compare June 12, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:advanced 200+ lines or 6+ files (auto-applied) testing Tests and test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(ci): container image smoke test via testcontainers

1 participant