Skip to content

Commit

Permalink
Clean up loading logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdharmon committed Jan 20, 2021
1 parent db21db3 commit 54a7629
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rules/chaos.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (rule *chaos) load() (bool, string, error) {
if rule.chance != 0 {
return true, fmt.Sprintf("chaos chance %s", value), nil
}
return true, fmt.Sprint("chaos loaded explicitly"), nil
return true, fmt.Sprint("chaos (no default)"), nil
}

func (rule *chaos) ShouldReap(pod v1.Pod) (bool, string) {
Expand Down
2 changes: 1 addition & 1 deletion rules/chaos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestChaosLoad(t *testing.T) {
os.Setenv(envExplicitLoad, ruleChaos)
loaded, message, err := (&chaos{}).load()
assert.NoError(t, err)
assert.Equal(t, "chaos loaded explicitly", message)
assert.Equal(t, "chaos (no default)", message)
assert.True(t, loaded)
})
}
Expand Down
2 changes: 1 addition & 1 deletion rules/container_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (rule *containerStatus) load() (bool, string, error) {
if len(rule.reapStatuses) != 0 {
return true, fmt.Sprintf("container status in [%s]", value), nil
}
return true, "container status loaded explicitly", nil
return true, "container status (no default)", nil
}

func (rule *containerStatus) ShouldReap(pod v1.Pod) (bool, string) {
Expand Down
2 changes: 1 addition & 1 deletion rules/container_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestContainerStatusLoad(t *testing.T) {
os.Setenv(envExplicitLoad, containerStatusName)
loaded, message, err := (&containerStatus{}).load()
assert.NoError(t, err)
assert.Equal(t, "container status loaded explicitly", message)
assert.Equal(t, "container status (no default)", message)
assert.True(t, loaded)
})
}
Expand Down
2 changes: 1 addition & 1 deletion rules/duration.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (rule *duration) load() (bool, string, error) {
if rule.duration != 0 {
return true, fmt.Sprintf("maximum run duration %s", value), nil
}
return true, fmt.Sprint("maximum run duration loaded explicitly"), nil
return true, fmt.Sprint("maximum run duration (no default)"), nil
}

func (rule *duration) ShouldReap(pod v1.Pod) (bool, string) {
Expand Down
2 changes: 1 addition & 1 deletion rules/duration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestDurationLoad(t *testing.T) {
os.Setenv(envExplicitLoad, ruleDuration)
loaded, message, err := (&duration{}).load()
assert.NoError(t, err)
assert.Equal(t, "maximum run duration loaded explicitly", message)
assert.Equal(t, "maximum run duration (no default)", message)
assert.True(t, loaded)
})
}
Expand Down
2 changes: 1 addition & 1 deletion rules/pod_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (rule *podStatus) load() (bool, string, error) {
if len(rule.reapStatuses) != 0 {
return true, fmt.Sprintf("pod status in [%s]", value), nil
}
return true, "pod status loaded explicitly", nil
return true, "pod status (no default)", nil
}

func (rule *podStatus) ShouldReap(pod v1.Pod) (bool, string) {
Expand Down
2 changes: 1 addition & 1 deletion rules/pod_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestPodStatusLoad(t *testing.T) {
os.Setenv(envExplicitLoad, podStatusName)
loaded, message, err := (&podStatus{}).load()
assert.NoError(t, err)
assert.Equal(t, "pod status loaded explicitly", message)
assert.Equal(t, "pod status (no default)", message)
assert.True(t, loaded)
})
}
Expand Down
2 changes: 1 addition & 1 deletion rules/unready.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (rule *unready) load() (bool, string, error) {
if rule.duration != 0 {
return true, fmt.Sprintf("maximum unready %s", value), nil
}
return true, fmt.Sprint("maximum unready duration loaded explicitly"), nil
return true, fmt.Sprint("maximum unready duration (no default)"), nil
}

func (rule *unready) ShouldReap(pod v1.Pod) (bool, string) {
Expand Down
2 changes: 1 addition & 1 deletion rules/unready_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestUnreadyLoad(t *testing.T) {
os.Setenv(envExplicitLoad, ruleUnready)
loaded, message, err := (&unready{}).load()
assert.NoError(t, err)
assert.Equal(t, "maximum unready duration loaded explicitly", message)
assert.Equal(t, "maximum unready duration (no default)", message)
assert.True(t, loaded)
})
}
Expand Down

0 comments on commit 54a7629

Please sign in to comment.