-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adding mrgvalidate style Test Id's #251
Conversation
"github.com/metrumresearchgroup/wrapt" | ||
) | ||
|
||
// TODO: remove initResults if we find no use |
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.
@elisarver made this comment 3 weeks ago. I think we're fine removing this, unless someone has a reason to keep it. Everything passes without it though.
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.
It's ok to remove this. Go compiler won't compile with missing variables, and this has been commented out to no ill effect.
runner/estimate_model_test.go
Outdated
OutputDir: "{{ .Name }}", | ||
} | ||
testId := "UNIT-RUN-003" | ||
tt.Run(testId, func(tt *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 added these tt.Run()
calls so that I could get the testId
into the output, but I'm not 100% confident this is the right way to do it. Any input is welcome.
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.
It will give you the sub test name after spending a slash to the outer test function name. I think a dash works here. Spaces in a test name are converted to underscores, btw.
@@ -127,6 +129,8 @@ func TestParseRunDetails(tt *testing.T) { | |||
} | |||
} | |||
|
|||
// This was turned off Sept 2021 but |
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.
@elisarver I think this was you. Do you remember why you commented this out? Maybe I missed it, but I can't find any comment or note. I'm considering whether we should just delete it?
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 don't think so. I used Todo in all my comments.
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.
This was commented out way back in 516fc46 (wip: consume grd file; change bool to new type Status, 2019-09-19). @elisarver just changed the commenting style in cd8ec1a (Wrapt, 2021-09-17)
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.
ah my bad. I should've clicked deeper on the git blame. Ok, I'll delete it. 2-year old commented code shall not survive this PR.
…ented out for 2 years
…Id even when no test name, so that we get the brackets.
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.
Going through the diff (using --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change
to clearly mark the tt.Run
movement), these test ID additions look good to me. I didn't think about the ID naming for each test, but the ones I did look at more closely made sense.
Also, I checked for duplicates and didn't find any:
git grep 'testId :=' | cut -d= -f2 | sort | uniq -d
Closes #246