-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit test for frontend/admin/handler - part 2 #6003
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted filessee 15 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Pull Request Test Coverage Report for Build 018f6355-2db9-4b66-8eea-28d1e6119fb4Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments
}, | ||
wantErr: false, | ||
}, | ||
"get dql message error": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit typo: dlq
}, | ||
}, | ||
hcHandlerFunc: func(mock *history.MockClient) { | ||
mock.EXPECT().GetDLQReplicationMessages(gomock.Any(), gomock.Any()).Return(nil, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's return some non-nil object here and validate it's received in test code
handler.domainDLQHandler = mockDlqHandler | ||
} | ||
|
||
_, err := handler.ReadDLQMessages(context.Background(), td.input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here. missing validation of returned messages for success case
domainDLQHandler: dlqMock, | ||
} | ||
|
||
_, err := handler.CountDLQMessages(context.Background(), td.input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
} | ||
} | ||
|
||
func Test_GetCrossClusterTasks(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @davidporter-id-au will cleanup cross cluster related code but doesn't hurt to keep these new tests until that happens
What changed?
Add more unit test for frontend/admin/handler
Why?
How did you test it?
Potential risks
Release notes
Documentation Changes