Remove the `Uuid` test seam from public constructors
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- docker, node.js, typescript
- 领域
- api, testing-qa
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.tspackages/testcontainers/src/docker-compose-environment/docker-compose-environment.tspackages/testcontainers/src/generic-container/generic-container-builder.ts
Notes
- Removing a constructor parameter and the
Uuidexports is breaking, hencemajor. DockerComposeEnvironmentalready haswithProjectName, which covers its use of the seam.
Dependencies
- Blocked by #1535:
Networkneeds a real way to set a name before its only constructor parameter is removed.
- 主要语言
- TypeScript
- 星标
- 2.6k
- 派生
- 274
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 44
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
testcontainers/testcontainers-node 的其他 Issue
-
enhancement minor
难度 2/5 1-3 小时 新手友好度 74/100
testcontainers/testcontainers-node#1539 ·
维护者通常 1 天内回复
-
enhancement minor
难度 2/5 1-3 小时 新手友好度 82/100
testcontainers/testcontainers-node#1533 ·
维护者通常 1 天内回复
-
enhancement minor
难度 2/5 1-3 小时 新手友好度 77/100
testcontainers/testcontainers-node#1531 ·
维护者通常 1 天内回复
-
enhancement minor
难度 2/5 1-3 小时 新手友好度 76/100
testcontainers/testcontainers-node#1529 ·
维护者通常 1 天内回复
-
enhancement minor
难度 2/5 1-3 小时 新手友好度 78/100
testcontainers/testcontainers-node#1528 ·
维护者通常 1 天内回复
查看 testcontainers/testcontainers-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
stellar/stellar-dev-skill#151 ·
维护者通常 1 天内回复
-
area:arcade game ready-for-agent
难度 2/5 1-3 小时 新手友好度 62/100
fderuiter/deruiter.dev#2281 · 1 条评论 ·
维护者通常 1 天内回复
-
scope: data grid type: bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flags未关闭
难度 2/5 1-3 小时 新手友好度 75/100
vicharanashala/ajrasakha#1439 ·
维护者通常 1 天内回复
-
approved check:passed streams:add
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复