Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add unit tests for InstanceMetadata

オープン
#262 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
go
領域
cloud, testing-qa

調査の方向性

Read InstanceMetadata in internal/provider/instances_v2.go and inspect the mock rework's parameter-asserting fake style first. Add coverage for each NIC and external-IP shape, hostname, provider ID, instance type, and both InstanceNetworkInterfaceList and InstanceExternalIpList error paths, asserting errors.Is; done means every listed shape and both errors are tested.

索引モデルが issue の本文から書いたものです。

説明

Kubernetes Cloud Controller Manager (CCM) Testing

Context

InstanceMetadata (internal/provider/instances_v2.go) is the most complex function in InstancesV2 — NIC dual-stack handling, SNAT filtering, external IP mapping, provider ID formatting — and it has zero test coverage today, even though the mock already has fields to fake its inputs.

Scope

Add unit tests covering:

  • v4-only, v6-only, and dual-stack NICs mapping to NodeInternalIP addresses.
  • SNAT external IPs being skipped.
  • Ephemeral and floating external IPs mapping to NodeExternalIP.
  • Hostname address always present.
  • Provider ID formatting (oxide://<uuid>).
  • Instance-type string (<ncpus>-<memory GiB>).
  • Error paths for InstanceNetworkInterfaceList and InstanceExternalIpList, asserted with errors.Is.

Done when

Each NIC/external-IP shape has a test and both error paths are asserted.

Blocked by the mock rework (parameter-asserting fakes) — build these tests on the new fake style.

主要言語
Go
スター
6
フォーク
2
平均マージ
2時間 50分
マージ済み PR(30日)
7

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oxidecomputer/oxide-cloud-controller-manager のほかの issue

oxidecomputer/oxide-cloud-controller-manager の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。