[pipedv1][terraform] Add unit tests for executeApplyStage, executePlanStage, and executeRollbackStage
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- go, terraform
- 領域
- devops, testing-qa
調査の方向性
まず pkg/app/pipedv1/plugin/terraform/deployment/apply.go、plan.go、rollback.go の TODO 箇所から始め、次に plugin_test.go とパッケージの testdata ディレクトリを確認してください。既存のテスト基盤に従って、記載されている失敗ケースとステータスケースの単体テストを追加してください。指定されたすべてのシナリオが網羅され、パッケージのテストが成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What would you like to be added:
Three stage-execution functions in the pipedv1 Terraform plugin are marked with // TODO: add test comments but have no unit tests:
pkg/app/pipedv1/plugin/terraform/deployment/apply.go:27-executeApplyStagepkg/app/pipedv1/plugin/terraform/deployment/plan.go:28-executePlanStagepkg/app/pipedv1/plugin/terraform/deployment/rollback.go:27-executeRollbackStage
These TODOs were left by the original authors as explicit invitations for contribution. The test infrastructure already exists (plugin_test.go and testdata/ directory in the same package), so no new scaffolding is needed.
Tests should cover at least:
executeApplyStage:
- Failure when
StageLogPersisteris unavailable (nil client) - Failure when
provider.NewTerraformCommandfails (invalid/missing directory)
executePlanStage:
- Failure when
StageLogPersisteris unavailable - Failure when
StageConfigJSON is invalid StageStatusExitedwhen plan shows no changes andExitOnNoChanges: trueStageStatusSuccesswhen plan shows no changes andExitOnNoChanges: false
executeRollbackStage:
- Failure when
StageLogPersisteris unavailable StageStatusFailurewhenRunningDeploymentSource.CommitHashis empty (first deployment guard)- Failure when
provider.NewTerraformCommandfails
Why is this needed:
These functions are core to the Terraform plugin's deployment lifecycle but are completely untested. Adding tests here improves confidence in the pipedv1 plugin architecture and aligns with the project's existing testing patterns already seen in plugin_test.go.
- 主要言語
- Go
- スター
- 1.4k
- フォーク
- 391
- 平均マージ
- 4日 1時間
- マージ済み PR(30日)
- 58
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pipe-cd/pipecd のほかの issue
-
Applications at the repository root are not triggered by new commits対応中かも @Daksha1611 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 2 日以内に返信
-
pipedv1 kubernetes plugins ignore trafficRouting.istio.host in K8S_TRAFFIC_ROUTING対応中かも @Dhirenderchoudhary が今日担当しました。 オープン
難易度 2/5 半日 初心者へのやさしさ 74/100
pipe-cd/pipecd#7626 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
pipectl transfer restore application drops backed-up labels対応中かも @bhavishyajain545 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
pipe-cd/pipecd#7622 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
docker-compose: postgres healthcheck should probe TCP (pg_isready -h localhost)対応中かも @zezo-mohamed22 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
OneBusAway/watchdog#305 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
self-care self-care:agent-discoverability
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
githubnext/gh-cao#20928 ·
メンテナーはふだん 1 日以内に返信
-
automation documentation
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
SocialGouv/iterion#3287 ·
メンテナーはふだん 1 日以内に返信