Skip to content

Commit

Permalink
use require for NoError
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Kieweg <mail@manuelkieweg.de>
  • Loading branch information
mkieweg committed Jun 25, 2024
1 parent 0dc0a92 commit 1be8574
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controller/appcontroller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@ apps/Deployment:

ctrl.processAppRefreshQueueItem()
apps, err := ctrl.appLister.List(labels.Everything())
assert.NoError(t, err)
require.NoError(t, err)
assert.NotEmpty(t, apps)
assert.Equal(t, tc.expectedStatus, apps[0].Status.Health.Status)
assert.NotEqual(t, testTimestamp, apps[0].Status.Health.LastTransitionTime)
Expand Down
2 changes: 1 addition & 1 deletion controller/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func TestSetApplicationHealth_HealthImproves(t *testing.T) {

t.Run(string(fmt.Sprintf("%s to %s", tc.oldStatus, tc.newStatus)), func(t *testing.T) {
healthStatus, err := setApplicationHealth(resources, resourceStatuses, overrides, app, true)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, tc.newStatus, healthStatus.Status)
assert.NotEqual(t, healthStatus.LastTransitionTime, timestamp)
})
Expand Down
2 changes: 1 addition & 1 deletion controller/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ func TestPreserveStatusTimestamp(t *testing.T) {
revisions := make([]string, 0)
revisions = append(revisions, "")
compRes, err := ctrl.appStateManager.CompareAppState(app, &defaultProj, revisions, sources, false, false, nil, false, false)
assert.NoError(t, err)
require.NoError(t, err)

assert.Equal(t, health.HealthStatusHealthy, compRes.healthStatus.Status)
assert.Equal(t, timestamp, compRes.healthStatus.LastTransitionTime)
Expand Down

0 comments on commit 1be8574

Please sign in to comment.