Accept a boolean in the no-argument flag setters
Les mainteneurs répondent en général sous 4 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 52/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- docker, node.js, typescript
Piste de recherche
Start with the listed generic container, builder, Docker Compose environment, and test files; compare the six no-argument setters with the existing boolean setters. Check the related work in #1524 and coordinate the shared TestContainer interface edit with #1529. Done means the flag setters accept an optional boolean defaulting to true, existing calls still work, conditional calls can turn flags off, and tests cover the behavior.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What happens
On/off settings are spelled two ways.
No argument, can only switch on:
GenericContainer.withReuse()GenericContainer.withPrivilegedMode()GenericContainer.withDefaultLogDriver()DockerComposeEnvironment.withBuild()DockerComposeEnvironment.withNoRecreate()GenericContainerBuilder.withBuildkit()
Boolean argument:
GenericContainer.withAutoCleanup(boolean)GenericContainer.withAutoRemove(boolean)DockerComposeEnvironment.withAutoCleanup(boolean)GenericContainerBuilder.withCache(boolean)
The no-argument form breaks the chain for conditional settings and cannot undo a setting that a subclass or module turned on:
const container = new GenericContainer(image).withExposedPorts(8080);
if (!process.env.CI) {
container.withReuse();
}
The modules are split the same way: 6 no-argument flag setters and 4 that take a boolean.
Expected
Flag setters accept an optional boolean that defaults to true, so withReuse() keeps working and withReuse(!process.env.CI) becomes possible.
Where
packages/testcontainers/src/generic-container/generic-container.tspackages/testcontainers/src/generic-container/generic-container-builder.tspackages/testcontainers/src/docker-compose-environment/docker-compose-environment.tspackages/testcontainers/src/test-container.ts
Notes
- Java takes a boolean in both
withReuse(boolean reusable)andwithPrivilegedMode(boolean mode). - Worth adding the convention to the
add-moduleskill.
Dependencies
- Stack on #1524: both change
withNoRecreate. - Coordinate with #1529: both edit the
TestContainerinterface.
- Langage dominant
- TypeScript
- Étoiles
- 2.7k
- Forks
- 290
- Merge moyen
- 4 j 1 h
- PR mergées (30 j)
- 22
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de testcontainers/testcontainers-node
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
testcontainers/testcontainers-node#1673 ·
Les mainteneurs répondent en général sous 4 jours
-
enhancement minor
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
testcontainers/testcontainers-node#1539 ·
Les mainteneurs répondent en général sous 4 jours
-
Let `Wait.forListeningPorts()` wait on specific portsPeut-être pris @artbom l’a pris il y a 29 jours. Ouverteenhancement minor
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
testcontainers/testcontainers-node#1533 ·
Les mainteneurs répondent en général sous 4 jours
-
enhancement minor
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
testcontainers/testcontainers-node#1531 ·
Les mainteneurs répondent en général sous 4 jours
-
Export the types used in public method signaturesPeut-être pris @artbom l’a pris il y a 29 jours. Ouverteenhancement minor
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
testcontainers/testcontainers-node#1528 ·
Les mainteneurs répondent en général sous 4 jours
Toutes les issues de testcontainers/testcontainers-node
Issues similaires
-
prio:low scope:hud
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
OliverRomhagen/vrigstad-joyride#953 ·
Les mainteneurs répondent en général sous 1 jour
-
review-followup
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
griffinwork40/agent-afk#5446 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
kacper-szewczyk/Ticknest#346 ·
Les mainteneurs répondent en général sous 1 jour
-
echarts geo: a GeoJSON URL that returns 200 with a body that is not JSON is fetched on each refreshOuvertebug plugin/echarts/geo
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
Yeachan-Heo/gajae-code#8230 ·
Les mainteneurs répondent en général sous 1 jour