Spec environment fixtures duplicate skeleton data that no spec reads
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 79/100
調査の方向性
まず spec/lib/simp/cli/commands/files/environments/ の下にあるフィクスチャと、名前の挙がっている3つのspec、simp_puppet_env_helper_spec.rb、set_site_scenario_action_spec.rb、cli_simp_scenario_spec.rbを確認します。どのレイアウト、hiera.yaml、manifests/site.pp、シナリオのファイル名に依存しているかを調べ、使用されていないYAML値をプレースホルダーまたはアサーション対象のキーに絞ります。specが引き続き通り、フィクスチャに未使用のスケルトンデータが重複していなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
The environment fixtures under spec/lib/simp/cli/commands/files/environments/ (simp/ and simp_hiera3/) are hand-copied from simp/simp-environment-skeleton. The specs that use them (simp_puppet_env_helper_spec.rb, set_site_scenario_action_spec.rb, cli_simp_scenario_spec.rb) copy the directories into a temp environment. They depend on the layout (data/ vs. hieradata/, hiera.yaml), on manifests/site.pp, and on which scenario files exist. No spec reads the Hiera values in the scenario or host files.
So every data change in the skeleton needs a matching manual edit here, even though no test can tell whether it was made. #237 changed six fixture files only to follow simp/simp-environment-skeleton#76 (haveged → rngd), and the copies have drifted anyway (#236).
Options:
- Cut the fixtures down to what the specs need. Keep the directory layout,
hiera.yaml,site.ppand the scenario file names, and replace the YAML contents with a minimal placeholder (or only the keys a spec actually asserts). Skeleton data changes then never touch this repo. This also makes #236 unnecessary. - Build the fixtures from the skeleton at test time, e.g. from the
simp-environment-skeletonRPM or a pinned checkout. That keeps them accurate, but it adds a network or package dependency to unit tests, so it's probably not worth it.
The first option looks like the better fit. The simp_hiera3/ copy has no current skeleton to follow anyway, so it can be trimmed the same way.
- 主要言語
- Ruby
- スター
- 2
- フォーク
- 12
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
simp/rubygem-simp-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
simp/rubygem-simp-cli#236 ·
-
simp config: write sssd::domains_entries instead of the deprecated sssd::domains対応中かも @silug が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
simp/rubygem-simp-cli#227 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
simp/rubygem-simp-cli#234 ·
-
needs-attention
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
simp/rubygem-simp-cli#223 ·
-
Dependency Dashboardオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
simp/rubygem-simp-cli#200 ·
simp/rubygem-simp-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
simp/pupmod-simp-pki#163 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
resend/resend-ruby#266 ·
メンテナーはふだん 5 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
SeleniumHQ/selenium#18323 ·
メンテナーはふだん 1 日以内に返信
-
Bug Ruby
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-ruby#3211 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
danbooru/fumimi-discord#63 ·