Backfill unit tests for cmd/pinniped/cmd/audit_id.go

This commit is contained in:
Joshua Casey
2024-11-27 13:53:02 -06:00
parent 8dffd60f0b
commit 51c86795af
3 changed files with 145 additions and 8 deletions
+2 -1
View File
@@ -4058,7 +4058,8 @@ func TestMaybePrintAuditID(t *testing.T) {
actualResponse, err := subjectRt.RoundTrip(mockRequest) //nolint:bodyclose // there is no Body.
require.Equal(t, test.responseErr, err) // This roundtripper only returns mocked errors.
require.Equal(t, test.response, actualResponse)
require.Equal(t, test.wantCalled, called, "expected logFunc to be called")
require.Equal(t, test.wantCalled, called,
"want logFunc to be called: %t, actually was called: %t", test.wantCalled, called)
})
}
}