Shared test helper to enroll a node in API integration tests
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
issueに記載されている6つの統合テストファイルから始め、繰り返し行われているjoin token、CSR、enrollmentのセットアップを比較します。apps/api/src/testing/にあるtesting helperと、fleetのenrollmentのエントリーポイントを読み、各テストで何を返す必要があるかを特定します。共有helperを追加し、この6つのテストだけを更新して、pnpm test:integrationを実行します。同じテスト数で成功し、これらのテストのどれもfleet/infrastructure/をimportしていなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
What
Six integration tests outside the fleet module enroll a test node by importing fleet/infrastructure/ca/x509 directly to build a certificate signing request:
apps/api/src/modules/apps/application-domains-http.integration.spec.tsapps/api/src/modules/confirmations/confirmation-http.integration.spec.tsapps/api/src/modules/deployments/agent-actions-http.integration.spec.tsapps/api/src/modules/deployments/allocation-observations.integration.spec.tsapps/api/src/modules/deployments/deployment-pipeline.integration.spec.tsapps/api/src/modules/deployments/pipeline-store.integration.spec.ts
CLAUDE.md says modules never import each other's infrastructure/. Tests are not production code, but the repeated setup also duplicates the same steps: issue a join token, build a CSR, enroll.
Proposed change
Add a shared helper in apps/api/src/testing/ (for example enroll-test-node.ts) that issues a join token, builds the CSR, enrolls a node and returns what the tests need. Use it in the six tests above and remove their direct fleet/infrastructure imports. The tests inside fleet itself can keep theirs.
Done when
- None of the files listed above imports
../fleet/infrastructure/. pnpm test:integrationpasses with the same number of tests.- Nothing changes outside
src/testing/and the six tests.
Raised in the review of #290.
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 1
- 平均マージ
- 7時間 17分
- マージ済み PR(30日)
- 197
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
shipkeepdev/shipkeep のほかの issue
-
good first issue priority:P2 track:control-plane
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
shipkeepdev/shipkeep#212 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue priority:P3 track:web
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
shipkeepdev/shipkeep#144 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue priority:P3 track:control-plane
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
shipkeepdev/shipkeep#143 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue priority:P3 track:control-plane
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
shipkeepdev/shipkeep#142 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue priority:P3 track:control-plane
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
shipkeepdev/shipkeep#141 ·
メンテナーはふだん 1 日以内に返信
shipkeepdev/shipkeep の issue をすべて見る
似ている issue
-
normalizePropName strips `#` characters from Figma property names instead of only the `#id` suffixオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
figma/code-connect#419 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jeanibarz/knowledge-base-mcp-server#1268 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
Koenkk/zigbee-herdsman-converters#13820 ·
メンテナーはふだん 2 日以内に返信
-
A live recovery copy treats a large whole number and text with the same digits as the same valueオープンbug sharing & sync
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信