Accept a boolean in the no-argument flag setters
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/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
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.7k
- Fork
- 290
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
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.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của testcontainers/testcontainers-node
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
testcontainers/testcontainers-node#1673 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
testcontainers/testcontainers-node#1539 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Let `Wait.forListeningPorts()` wait on specific portsCó thể đã có người làm @artbom đã nhận 29 ngày trước. Đang mởenhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
testcontainers/testcontainers-node#1533 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
testcontainers/testcontainers-node#1531 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Export the types used in public method signaturesCó thể đã có người làm @artbom đã nhận 29 ngày trước. Đang mởenhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
testcontainers/testcontainers-node#1528 ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của testcontainers/testcontainers-node
Issue tương tự
-
prio:low scope:hud
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OliverRomhagen/vrigstad-joyride#953 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
review-followup
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
griffinwork40/agent-afk#5446 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
kacper-szewczyk/Ticknest#346 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
echarts geo: a GeoJSON URL that returns 200 with a body that is not JSON is fetched on each refreshĐang mởbug plugin/echarts/geo
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Yeachan-Heo/gajae-code#8230 ·
Maintainer thường phản hồi trong vòng 1 ngày