-
Notifications
You must be signed in to change notification settings - Fork 139
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
[YUNIKORN-563] test: improve unit test assertion #739
Conversation
assert.Assert(t, result != nil) | ||
assert.Equal(t, len(result), 1) | ||
assert.Equal(t, result["a"], "b") | ||
testCases := []struct { |
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.
|
||
assert.DeepEqual(t, holder.pod.Labels, map[string]string{ | ||
"applicationId": "app01", | ||
"labelKey0": "labelKeyValue0", | ||
"labelKey1": "labelKeyValue1", | ||
"placeholder": "true", | ||
"queue": "root.default", | ||
}) |
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.
https://github.com/apache/yunikorn-k8shim/pull/239/files#r592236442
I didn't refactor the holder.pod.Annotations
, because it contains yunikorn.apache.org/task-groups
has a long value.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #739 +/- ##
==========================================
- Coverage 69.46% 69.43% -0.03%
==========================================
Files 50 50
Lines 7993 7993
==========================================
- Hits 5552 5550 -2
- Misses 2252 2254 +2
Partials 189 189 ☔ View full report in Codecov by Sentry. |
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.
+1
What is this PR for?
Improve unit test assertion
What type of PR is it?
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-563
How should this be tested?
Screenshots (if appropriate)
Questions: