Add lifecycle-style tests

Đang mở
#437 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
fastapi, github-actions, python
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

Start by reading tests/test_server_catch_uvicorn_shutdown.py and the clean-shutdown test in tests/test_mjpeg_stream.py around line 398. Add a CI job that runs a non-pytest lifecycle test, sends Ctrl+C at the appropriate point, and checks the expected output; adapting or factoring out the MJPEG shutdown helper is suggested. Done when the CI job verifies server shutdown successfully.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

good first issue help wanted low priority

@julianstirling pointed out on #433 that it might be worth running a non-pytest test or two in CI, to verify e.g. shutdown logic in a full-blown server.

We don't think this needs to happen immediately, but it would be a nice self-contained job for a rainy day or someone who fancies contributing to the CI workflow.

The code could be as simple as running [tests/test_server_catch_uvicorn_shutdown.py](https://github.com/labthings/labthings-fastapi/pull/433/changes#diff-03df0a3c13dc7f04b79c2d785feeb45b5fb2f607fd06707333be6c2b69bc7ca0), though it would need to figure out how to send a Ctrl + C at the right moment and then check for the right output.

It's possible the test code I added for clean shutdown of the MJPEG stream could be adapted for this, possibly by factoring it out into a utility function.

Ngôn ngữ chính
Python
Star
10
Fork
4
Merge trung bình
4 ngày 15 giờ
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của labthings/labthings-fastapi

Tất cả issue của labthings/labthings-fastapi

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.