Skip to content
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

Merged
merged 12 commits into from
Oct 11, 2021
Merged

Conversation

seth127
Copy link
Collaborator

@seth127 seth127 commented Oct 1, 2021

Closes #246

"github.com/metrumresearchgroup/wrapt"
)

// TODO: remove initResults if we find no use
Copy link
Collaborator Author

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.

Copy link
Contributor

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.

OutputDir: "{{ .Name }}",
}
testId := "UNIT-RUN-003"
tt.Run(testId, func(tt *testing.T) {
Copy link
Collaborator Author

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.

Copy link
Contributor

@elisarver elisarver Oct 1, 2021

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
Copy link
Collaborator Author

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?

Copy link
Contributor

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.

Copy link
Collaborator

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)

Copy link
Collaborator Author

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.

@seth127 seth127 closed this Oct 7, 2021
@seth127 seth127 reopened this Oct 7, 2021
@seth127 seth127 marked this pull request as ready for review October 7, 2021 15:11
Copy link
Collaborator

@kyleam kyleam left a 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

@seth127 seth127 merged commit 1578f9d into develop Oct 11, 2021
@seth127 seth127 deleted the test/adding_mrgvalidate_tags branch October 11, 2021 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add mrgvalidate Test Id's to any tests that are missing them
3 participants