Rename the test that fully boots the server to lifecycle_test
This commit is contained in:
parent
1e36811796
commit
c9ac85bffc
3 changed files with 9 additions and 5 deletions
|
|
@ -209,14 +209,14 @@ build-docs:
|
||||||
- !reference [.python, rules]
|
- !reference [.python, rules]
|
||||||
|
|
||||||
# Only runs when a .py file is edited
|
# Only runs when a .py file is edited
|
||||||
server_integration_tests:
|
server_lifecycle_test:
|
||||||
extends: .python
|
extends: .python
|
||||||
stage: integration
|
stage: integration
|
||||||
needs:
|
needs:
|
||||||
- job: build
|
- job: build
|
||||||
artifacts: true
|
artifacts: true
|
||||||
script:
|
script:
|
||||||
- tests/integration_tests/testfile.py
|
- tests/lifecycle_test/testfile.py
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
needs:
|
needs:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
"""Start a server subprocess for integration tests.
|
"""Start a server subprocess for testing the server's life cycle.
|
||||||
|
|
||||||
|
This test spools up a server in a sub process. Connects to an MJPEG stream, runs a
|
||||||
|
couple of other tests. Most importantly it checks the server shuts down gracefully
|
||||||
|
despite the MJPEG stream being connected.
|
||||||
|
|
||||||
These tests are separated from unit tests to avoid inflating test coverage.
|
These tests are separated from unit tests to avoid inflating test coverage.
|
||||||
For now, this file should be run directly rather than through a test framework.
|
This file should be run directly rather than through a test framework.
|
||||||
|
|
||||||
They are designed to run on CI and should work on Linux or WSL for local debugging.
|
They are designed to run on CI and should work on Linux or WSL for local debugging.
|
||||||
"""
|
"""
|
||||||
|
|
@ -4,7 +4,7 @@ Rather than spinning up a full uvicorn webserver for each test these tests use
|
||||||
the FastAPI ``TestClient`` or directly communicate with the underlying
|
the FastAPI ``TestClient`` or directly communicate with the underlying
|
||||||
LabThings-FastAPI code. This increases speed of testing significantly.
|
LabThings-FastAPI code. This increases speed of testing significantly.
|
||||||
|
|
||||||
For tests that require a full running server see the ``integration_tests``
|
For tests that require a full running server see the ``lifecycle_test``
|
||||||
directory in the tests directory.
|
directory in the tests directory.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue