-
Notifications
You must be signed in to change notification settings - Fork 35
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
DSU-1393 Run unit tests on CI #149
Merged
+92
−26
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d131266
added test.yaml
vtopc 3c6294f
temporary disable 1.18
vtopc a122482
skip TestSrvResolverBuilderSuccess
vtopc 6b0cf6d
fix for package clock
vtopc b280a72
fixed TestAnonymizeSquashesAdjacentSecrets
vtopc 4d920a6
fixed TestUntilInterval
vtopc 397e340
package errors
vtopc d2cb492
idiomatic naming
vtopc 64a7bce
added TODO
vtopc 2c27169
disable TestSleep
vtopc cd4d6e7
disable TestNewClientTLS
vtopc beaf204
disabled TestGetSRVAddresses
vtopc 3369552
disabled TestFormatGeneric
vtopc 88a329d
disabled TestDummySpan
vtopc cbd5a0f
lint
vtopc 99728ca
fixed TestUntilInterval
vtopc 0066fe9
TODO
vtopc 66b4f17
added 1.18
vtopc 1c14a58
Merge branch 'master' of github.com:mailgun/holster into vtopc/DSU-1393
vtopc 4bfc996
enabled TestDummySpan
vtopc f1b4b98
Merge branch 'master' of github.com:mailgun/holster into vtopc/DSU-1393
vtopc 144879d
Merge branch 'master' of github.com:mailgun/holster into vtopc/DSU-1393
vtopc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: test | ||
strategy: | ||
matrix: | ||
go-version: | ||
- 1.18.x | ||
- 1.19.x | ||
os: [ ubuntu-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
cache: true # caching and restoring go modules and build outputs | ||
|
||
- run: go env | ||
|
||
- name: Install deps | ||
run: go mod download | ||
|
||
- name: Start containers | ||
run: docker-compose up -d --build | ||
|
||
- name: Test | ||
run: make test | ||
|
||
- name: Stop containers | ||
if: always() | ||
run: docker-compose down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ func (s *AnonymizeSuite) TestAnonymizeSquashesAdjacentSecrets() { | |
"Hello Иван Иванов ivan ivanov foo.bar", | ||
`"Иван Иванов" <[email protected]>`) | ||
s.Nil(err) | ||
s.Equal(anonimized, "Hello xxx") | ||
s.Equal("xxx", anonimized) | ||
} | ||
|
||
func (s *AnonymizeSuite) TestAnonymizeNames() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Curious about this one: any context on why we do
for i := range starts
instead offor _, start := range starts {
? More of a stylistic item but I've leaned towards the explicit form where we show that the range clause is actually 2 valuesThere 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've just renamed the variable based on https://dave.cheney.net/practical-go/presentations/qcon-china.html#_use_a_consistent_naming_style
Also, it can't be
for _, start := range starts {
cause we need to pass index to thetestFormatCompleteCompare()
.From a performance perspective, index access is preferable for the slice of big objects - https://go-critic.com/overview.html#rangeValCopy-ref