Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GUID tests to use t.Run #256

Merged
merged 1 commit into from
Aug 29, 2022
Merged

GUID tests to use t.Run #256

merged 1 commit into from
Aug 29, 2022

Conversation

helsaawy
Copy link
Contributor

@helsaawy helsaawy commented Aug 22, 2022

Using subtests with t.Run() for GUID testing.

Added .String to GUID Variant and Version using golang.org/x/tools/cmd/stringer.

Added tools.go to version stringer in go.mod and allow go generate ./... to be run without needing a go get call.
Based off of go wiki recommendation.

Signed-off-by: Hamza El-Saawy hamzaelsaawy@microsoft.com

@helsaawy helsaawy requested a review from a team as a code owner August 22, 2022 15:42
@helsaawy
Copy link
Contributor Author

rebased onto main to fix merge conflicts

@helsaawy helsaawy force-pushed the he/guid branch 3 times, most recently from 76d373b to e84434c Compare August 24, 2022 15:49
Switched to subtests using `t.Run()` for GUID testing, rather than using
log statements to demarcate different tests.

Added `.String` to GUID `Variant` and `Version` using
`golang.org/x/tools/cmd/stringer`.

Added `tools.go` to version `stringer` in go.mod and allow
`go generate ./...` to be run without needing a `go get` call.
Based off of [go wiki](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module)
recommendation.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
Copy link
Member

@kevpar kevpar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@helsaawy helsaawy merged commit 376b201 into microsoft:main Aug 29, 2022
@helsaawy helsaawy deleted the he/guid branch August 29, 2022 20:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants