Skip to content

Commit cb8501d

Browse files
committed
docs: add doc comments to exported symbols for CI coverage
1 parent 7be87cb commit cb8501d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

fault-quarantine/pkg/config/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ type RuleSet struct {
6767
Cordon Cordon `toml:"cordon"`
6868
}
6969

70+
// SkipNodeLabel defines a label key/value pair that causes fault-quarantine
71+
// to silently drop events for any node carrying the matching label.
7072
type SkipNodeLabel struct {
7173
Key string `toml:"key"`
7274
Value string `toml:"value"`

fault-quarantine/pkg/reconciler/reconciler_e2e_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6719,6 +6719,8 @@ func TestE2E_ManualUntaintAnnotationCleanup(t *testing.T) {
67196719
}, eventuallyTimeout, eventuallyPollInterval, "Manual untaint annotation should be removed, FQ annotations added with taint applied")
67206720
}
67216721

6722+
// TestE2E_SkipNodeLabels_UnhealthyEvent_SkipsQuarantine verifies that an unhealthy
6723+
// event is silently dropped for a node carrying a configured skip label.
67226724
func TestE2E_SkipNodeLabels_UnhealthyEvent_SkipsQuarantine(t *testing.T) {
67236725
ctx, cancel := context.WithTimeout(e2eTestContext, 20*time.Second)
67246726
defer cancel()
@@ -6785,6 +6787,8 @@ func TestE2E_SkipNodeLabels_UnhealthyEvent_SkipsQuarantine(t *testing.T) {
67856787
}, neverTimeout, neverPollInterval, "Node with skip label should not be quarantined")
67866788
}
67876789

6790+
// TestE2E_SkipNodeLabels_HealthyEvent_DoesNotUncordon verifies that a healthy event
6791+
// does not uncordon a quarantined node when the node carries a configured skip label.
67886792
func TestE2E_SkipNodeLabels_HealthyEvent_DoesNotUncordon(t *testing.T) {
67896793
ctx, cancel := context.WithTimeout(e2eTestContext, 30*time.Second)
67906794
defer cancel()
@@ -6884,6 +6888,8 @@ func TestE2E_SkipNodeLabels_HealthyEvent_DoesNotUncordon(t *testing.T) {
68846888
}, neverTimeout, neverPollInterval, "Node should remain cordoned when skip label is present")
68856889
}
68866890

6891+
// TestE2E_SkipNodeLabels_EmptyConfig_QuarantinesNode verifies that events are
6892+
// processed normally when the skipNodeLabels configuration is empty.
68876893
func TestE2E_SkipNodeLabels_EmptyConfig_QuarantinesNode(t *testing.T) {
68886894
ctx, cancel := context.WithTimeout(e2eTestContext, 20*time.Second)
68896895
defer cancel()
@@ -6942,6 +6948,8 @@ func TestE2E_SkipNodeLabels_EmptyConfig_QuarantinesNode(t *testing.T) {
69426948
}, eventuallyTimeout, eventuallyPollInterval, "Node should be cordoned when skipNodeLabels is empty")
69436949
}
69446950

6951+
// TestE2E_SkipNodeLabels_NoMatchingValue_QuarantinesNode verifies that events are
6952+
// processed normally when the node's label value does not match the skip config.
69456953
func TestE2E_SkipNodeLabels_NoMatchingValue_QuarantinesNode(t *testing.T) {
69466954
ctx, cancel := context.WithTimeout(e2eTestContext, 20*time.Second)
69476955
defer cancel()
@@ -7003,6 +7011,8 @@ func TestE2E_SkipNodeLabels_NoMatchingValue_QuarantinesNode(t *testing.T) {
70037011
}, eventuallyTimeout, eventuallyPollInterval, "Node should be cordoned when label value doesn't match skip config")
70047012
}
70057013

7014+
// TestE2E_SkipNodeLabels_CacheMissFailsOpen verifies that isNodeSkipped returns
7015+
// false (fail-open) when the node is not present in the informer cache.
70067016
func TestE2E_SkipNodeLabels_CacheMissFailsOpen(t *testing.T) {
70077017
ctx, cancel := context.WithTimeout(e2eTestContext, 20*time.Second)
70087018
defer cancel()

0 commit comments

Comments
 (0)