Skip to content

feat: run neutron unit tests during build via tox#527

Draft
Mohammed Naser (mnaser) wants to merge 1 commit intomainfrom
feat/build-time-unit-tests
Draft

feat: run neutron unit tests during build via tox#527
Mohammed Naser (mnaser) wants to merge 1 commit intomainfrom
feat/build-time-unit-tests

Conversation

@mnaser
Copy link
Member

Summary

Add build-time unit testing for neutron, following the Debian packaging pattern where tests run as part of the build process.

How it works

  1. New neutron-build stage: COPYs neutron source, runs tox -epy3 (full unit test suite), then uv build to produce a wheel
  2. build stage: bind-mounts the wheel from neutron-build instead of raw source — structurally forces tests to pass before the image can be built
  3. Final image installs from the tested .whl, keeping the same clean venv

Benefits

  • Catches broken patches and dependency issues at build time, not deploy time
  • BuildKit runs neutron-build and ovsinit in parallel
  • Test deps never reach the final image (they stay in the neutron-build stage)
  • Pattern is replicable across all docker-* repos (nova, manila, etc.)

Draft

Opening as a test run to see if CI passes with the unit test suite.

@mnaser Mohammed Naser (mnaser) force-pushed the feat/build-time-unit-tests branch 2 times, most recently from 2d303fb to a57e200 Compare February 18, 2026 20:28
Add a neutron-build stage that COPYs the neutron source, runs the
full unit test suite via tox, then produces a wheel. The build stage
installs from the tested wheel instead of raw source, structurally
forcing tests to pass before the image can be built.

This follows the Debian packaging pattern where tests run as part of
the build process, catching broken patches and dependency issues
before the image is shipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant