[BEAM-13343][Playground] Support go unit tests#16138
Conversation
3836593 to
43d0a24
Compare
KhaninArtur
left a comment
There was a problem hiding this comment.
LGTM
Just be sure that this one goes after (and says that it depends on) Java unit tests in the tasks list of PRs to review
a02a295 to
e72f3a7
Compare
e72f3a7 to
61fb10d
Compare
There was a problem hiding this comment.
Could we combine this one?
6a5a2d6 to
6c87b92
Compare
# Conflicts: # playground/backend/internal/code_processing/code_processing.go # playground/backend/internal/setup_tools/builder/setup_builder.go # playground/backend/internal/setup_tools/builder/setup_builder_test.go
12dac8b to
d1b5af7
Compare
Co-authored-by: Aydar Zainutdinov <aydar.zaynutdinov@akvelon.com>
| ENTRYPOINT ["/opt/playground/backend/server_go_backend"] | ||
|
|
||
|
|
||
| ENTRYPOINT ["/opt/playground/backend/server_go_backend"] No newline at end of file |
There was a problem hiding this comment.
add an empty string.
| // Check if unit test | ||
| isUnitTest := false | ||
| valResult, ok := validationResults.Load(validators.UnitTestValidatorName) | ||
| if ok && valResult.(bool) { | ||
| isUnitTest = true | ||
| } |
There was a problem hiding this comment.
Maybe wrap it like a separate method?
| const ( | ||
| nameBinGo = "go" | ||
| fmtArgs = "fmt" | ||
| goName = "go" |
There was a problem hiding this comment.
maybe goFileExtension instead of goName?
| } | ||
| // Check if unit test | ||
| isUnitTest := false | ||
| valResult, ok := validationResults.Load(validators.UnitTestValidatorName) |
There was a problem hiding this comment.
| valResult, ok := validationResults.Load(validators.UnitTestValidatorName) | |
| validateIsUnitTest, ok := validationResults.Load(validators.UnitTestValidatorName) |
| "testing" | ||
| ) | ||
|
|
||
| func TestMain(m *testing.M) { |
There was a problem hiding this comment.
Can you add documentation to this file to explain that it defines some common methods for validators? (I was confused looking for a test within it, but there aren't any tests in it, right?)
There was a problem hiding this comment.
Thanks, Pablo, I've added this to PR #16206
[BEAM-13343] Add cmd for running go unit tests
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunnercompliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.