Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

TestReconcile_LicenseRotationUploadsNewSecretValue fails at -count=3 (reuses a control plane name)

未关闭 适合新手
#320 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, kubernetes
领域
testing

调研方向

失败的测试是 internal/controller/codercontrolplane_controller_test.go 第 895 行的 TestReconcile_LicenseRotationUploadsNewSecretValue。先阅读该测试如何为其 CoderControlPlane 命名,以及它的清理逻辑如何在 envtest 中删除该对象。使用 GOFLAGS=-mod=vendor go test ./internal/controller/ -run 'TestReconcile_LicenseRotationUploadsNewSecretValue$' -count=3 复现问题。重复运行通过即视为完成。修复名称或等待删除完成的逻辑时,不应改变测试的断言。

由索引模型根据 Issue 内容生成。

描述

Summary

TestReconcile_LicenseRotationUploadsNewSecretValue (internal/controller/codercontrolplane_controller_test.go:895) fails when run with -count=3. It reuses a fixed CoderControlPlane name, and a later run starts before envtest has removed the object from the earlier run.

Reproduce

GOFLAGS=-mod=vendor go test ./internal/controller/ -run 'TestReconcile_LicenseRotationUploadsNewSecretValue$' -count=3

The #156 worker reported this while it ran repeated tests for #316. I did not reproduce it myself.

Fix

Give each run a unique name (for example a suffix from t.Name() plus a counter or random string), or wait until the object is gone in cleanup. CI runs each test once, so CI is not affected today.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium

主要语言
Go
星标
5
派生
3
平均合并
3 小时
30 天内合并 PR
192

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/coder-k8s 的其他 Issue

查看 coder/coder-k8s 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。