Branch: OCPBUGS-88531 in ~/bryan-cox/cluster-network-operator
| Check | Result | Notes |
|---|---|---|
make build | PASS | All 3 binaries built successfully (cluster-network-operator, check-endpoints, check-target) |
make test | PASS | All packages passed including pkg/hypershift with new tests |
make verify | PASS | make verify-update-codegen passed — codegen up to date, no diff |
| Test Suite | Command | Result | Tests Run |
|---|---|---|---|
| ParseHostedControlPlane (existing) | go test ./pkg/hypershift/... -run TestParseHostedControlPlane$ |
PASS | 1 |
| ParseHostedControlPlane RestartDate (new) | go test ./pkg/hypershift/... -run TestParseHostedControlPlaneRestartDate |
PASS | 1 |
| SetRestartDateAnnotation (new, 6 subtests) | go test ./pkg/hypershift/... -run TestSetRestartDateAnnotation |
PASS | 6 |
| Total new unit tests | 7 tests (1 parse + 6 annotation subtests) | ||
| Test | What It Verifies |
|---|---|
TestParseHostedControlPlaneRestartDate | Parses hypershift.openshift.io/restart-date from HCP YAML fixture |
TestSetRestartDateAnnotation/sets_annotation_on_Deployment | Deployment pod template gets restart-date annotation |
TestSetRestartDateAnnotation/sets_annotation_on_DaemonSet | DaemonSet pod template gets restart-date annotation |
TestSetRestartDateAnnotation/sets_annotation_on_StatefulSet | StatefulSet pod template gets restart-date annotation |
TestSetRestartDateAnnotation/skips_non-apps/v1_objects | ConfigMap and other non-apps/v1 objects are untouched |
TestSetRestartDateAnnotation/preserves_existing_annotations | Pre-existing pod template annotations are not clobbered |
TestSetRestartDateAnnotation/handles_multiple_objects | Mixed list of Deployments, DaemonSets, ConfigMaps processed correctly |
make test)$ cd ~/bryan-cox/cluster-network-operator && go test -v -mod=vendor ./pkg/hypershift/... -run 'TestParseHostedControlPlane$|TestParseHostedControlPlaneRestartDate|TestSetRestartDateAnnotation'
=== RUN TestParseHostedControlPlane
--- PASS: TestParseHostedControlPlane (0.00s)
=== RUN TestParseHostedControlPlaneRestartDate
--- PASS: TestParseHostedControlPlaneRestartDate (0.00s)
=== RUN TestSetRestartDateAnnotation
=== RUN TestSetRestartDateAnnotation/sets_annotation_on_Deployment_pod_template
=== RUN TestSetRestartDateAnnotation/sets_annotation_on_DaemonSet_pod_template
=== RUN TestSetRestartDateAnnotation/sets_annotation_on_StatefulSet_pod_template
=== RUN TestSetRestartDateAnnotation/skips_non-apps/v1_objects
=== RUN TestSetRestartDateAnnotation/preserves_existing_pod_template_annotations
=== RUN TestSetRestartDateAnnotation/handles_multiple_objects
--- PASS: TestSetRestartDateAnnotation (0.00s)
--- PASS: TestSetRestartDateAnnotation/sets_annotation_on_Deployment_pod_template (0.00s)
--- PASS: TestSetRestartDateAnnotation/sets_annotation_on_DaemonSet_pod_template (0.00s)
--- PASS: TestSetRestartDateAnnotation/sets_annotation_on_StatefulSet_pod_template (0.00s)
--- PASS: TestSetRestartDateAnnotation/skips_non-apps/v1_objects (0.00s)
--- PASS: TestSetRestartDateAnnotation/preserves_existing_pod_template_annotations (0.00s)
--- PASS: TestSetRestartDateAnnotation/handles_multiple_objects (0.00s)
PASS
ok github.com/openshift/cluster-network-operator/pkg/hypershift 0.802s