Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add `pause()`, `unpause()` and `kill()` to started containers

Đang mở
#1,549 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 1 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
71/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, node.js, typescript
Lĩnh vực
backend, testing

Hướng nghiên cứu

Start with the three named files: packages/testcontainers/src/test-container.ts, packages/testcontainers/src/generic-container/started-generic-container.ts, and packages/testcontainers/src/container-runtime/clients/container/container-client.ts; trace how stop() and restart() are forwarded today. Add the requested pause, unpause, and signal-aware kill methods across the interface and implementation. Done when tests cover these operations and the requested default signal; coordinate with issues #1545 and #1541 on container state.

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

Mô tả

enhancement minor

What happens

A started container can be stopped and restarted, and nothing else:

  • no pause() or unpause()
  • no kill(), and stop() cannot choose the signal

Tests for reconnects, failover and timeouts need exactly these. Today they go through getContainerRuntimeClient() and Dockerode, or add the Toxiproxy module for something a pause would cover.

Expected

On StartedTestContainer:

  • pause() and unpause()
  • kill(signal = "SIGKILL")

Where

  • packages/testcontainers/src/test-container.ts
  • packages/testcontainers/src/generic-container/started-generic-container.ts
  • packages/testcontainers/src/container-runtime/clients/container/container-client.ts

Notes

  • .NET's IContainer has PauseAsync and UnpauseAsync.
  • After kill() the object describes a container that is no longer running, which is where state accessors and restarting a stopped container come in.

Dependencies

  • Nothing blocks this. It can start now.
  • Coordinate with #1545, #1541: a killed or paused container needs the state accessors, and a way back to running.
  • Changes StartedTestContainer, which today means the interface, StartedGenericContainer and the forwarder on AbstractStartedContainer. Several other issues do the same. The edits do not overlap, so they can go in parallel.
Ngôn ngữ chính
TypeScript
Star
2.6k
Fork
274
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
44

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 testcontainers/testcontainers-node

Tất cả issue của testcontainers/testcontainers-node

Issue tương tự

Thêm issue về TypeScript

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.