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

test(kubernetes): cover the provider's main paths

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

维护者通常 1 天内回复

@afsuyadi 已经在做这个了。

开始于 2026年10月16日。

  • #416 来自 @afsuyadi —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
kubernetes, python
领域
testing-qa

调研方向

从 tests/providers/kubernetes/test_attribute.py 开始,它运行一个策略,并复用 tests/providers/kubernetes/input.yml 这个夹具(ServiceAccount、Role、RoleBinding、Service、Deployment、Pod)。为缺失的 kind(severity 为 1 的错误)、像 metadata.name 这样的普通路径、带 * 的路径,以及返回 None 的缺失属性,分别添加独立的测试。每个用例都有自己的测试,并对结果值进行明确的断言,同时 pytest tests/ 和 black --line-length 120 均通过,即为完成。

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

描述

good first issue hacktoberfest tests
Problem

tests/providers/kubernetes/test_attribute.py runs one policy. Nothing covers a kind that is absent, a path without *, or an attribute missing from a resource.

What to change

Tests only, reusing tests/providers/kubernetes/input.yml (it holds a ServiceAccount, Role, RoleBinding, Service, Deployment and Pod). Add cases for:

  • kind not found (severity 1 error)
  • a plain path such as metadata.name
  • a * path
  • a missing attribute (value None)
Done when

Each case has its own test with an explicit assertion on the result values.


Comment to claim this issue and wait to be assigned. Unclaimed or inactive for 3 days, it returns to the pool. Run pytest tests/ and black --line-length 120 before opening the PR.

主要语言
Python
星标
176
派生
54
平均合并
1 天 20 小时
30 天内合并 PR
9

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

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

StackGuardian/tirith 的其他 Issue

查看 StackGuardian/tirith 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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