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

Remove the `Uuid` test seam from public constructors

Aperta
#1,561 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, node.js, typescript
Ambito
api, testing-qa

Direzione di ricerca

Read the three listed constructor files and inspect the Uuid, RandomUuid, and randomUuid exports. Start by checking the dependency on #1535 and the existing withProjectName pattern; decide how deterministic names should be supplied for Network and GenericContainerBuilder. Done means public constructors accept user-facing arguments, tests can still choose deterministic names, and the UUID exports are removed; the issue does not name test files.

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

Descrizione

maintenance major

What happens

Three public constructors take a Uuid parameter that exists only so tests can inject deterministic names:

  • new Network(uuid?)
  • new DockerComposeEnvironment(composeFilePath, composeFiles, uuid?)
  • new GenericContainerBuilder(context, dockerfileName, uuid?)

It is the reason Uuid, RandomUuid and randomUuid are exported from the package. For Network it is the only constructor parameter, which takes the slot that real options would use.

Expected

Public constructors take only user-facing arguments. Tests get deterministic names another way, for example a withName/withProjectName style setter or an internal factory.

Where

  • packages/testcontainers/src/network/network.ts
  • packages/testcontainers/src/docker-compose-environment/docker-compose-environment.ts
  • packages/testcontainers/src/generic-container/generic-container-builder.ts

Notes

  • Removing a constructor parameter and the Uuid exports is breaking, hence major.
  • DockerComposeEnvironment already has withProjectName, which covers its use of the seam.

Dependencies

  • Blocked by #1535: Network needs a real way to set a name before its only constructor parameter is removed.
Lingua principale
TypeScript
Stelle
2.6k
Fork
274
Merge medio
1g 14h
PR unite (30g)
44

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.