Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,549 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
71/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, node.js, typescript
Ambito
backend, testing

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
TypeScript
Stelle
2.6k
Fork
277
Merge medio
1g 53m
PR unite (30g)
58

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testcontainers/testcontainers-node

Tutte le issue di testcontainers/testcontainers-node

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.