-
Notifications
You must be signed in to change notification settings - Fork 1
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
[NH-50167] Run tests on Windows in GHA #121
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
02e6e1d
First pass at running on windows action
swi-jared 3447c2b
Try using an envvar
swi-jared 705802f
Write a config file
swi-jared 1be17a0
platform indepedendent errs, one windows-specific string check
swi-jared 91668b1
Use require
swi-jared e5de4ad
Add missing file close
swi-jared fae6657
Handle error properly on file close
swi-jared 6184ac8
Handle connrefused err
swi-jared 5f8b22d
Updates to certgen.sh
swi-jared f16177f
Misc test updates
swi-jared 5043b6a
Misc test updates
swi-jared 23e49f8
Test if setting the path to C: helps
swi-jared 036d44f
Add forgotten matrix path
swi-jared c0a58b3
Restore previous build yaml
swi-jared d13a9fd
Skip reporter_grpc_test.go on windows
swi-jared 0321a01
Skip reporter_test.go on windows
swi-jared 4b26227
Add some test error debug
swi-jared 1e17c9c
Wrong test
swi-jared b79e4d0
Add a touch of delay for Windows
swi-jared f7d126e
Misc windows-related fixes
swi-jared cd360f9
Create our own connrefused for Windows
swi-jared bb203c2
oops
swi-jared a34f8a0
oops again
swi-jared 0759cec
Let's see if this works
swi-jared e329b33
Try using a higher port for windows
swi-jared 1ec3908
Revert "Try using a higher port for windows"
swi-jared 0d4b73c
Change placement of err check
swi-jared b7b08b1
Minor test cleanup
swi-jared 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 |
---|---|---|
|
@@ -20,11 +20,12 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: Jerome1337/[email protected] | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goversion: ['1.21', '1.22'] | ||
name: Go ${{ matrix.goversion }} tests | ||
os: ['ubuntu-latest', 'windows-latest'] | ||
name: Go ${{ matrix.goversion }} (${{ matrix.os}}) tests | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
SW_APM_DEBUG_LEVEL: 1 | ||
steps: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,16 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
CONFIG=$(mktemp) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes were required because the behavior of bash in Windows. |
||
echo "[req] | ||
distinguished_name=req_distinguished_name | ||
prompt=no | ||
[san] | ||
subjectAltName=DNS:localhost | ||
[req_distinguished_name] | ||
CN=localhost | ||
" > $CONFIG | ||
echo $CONFIG | ||
openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes \ | ||
-keyout for_test.key -out for_test.crt -extensions san -config \ | ||
<(echo "[req]"; | ||
echo distinguished_name=req; | ||
echo "[san]"; | ||
echo subjectAltName=DNS:localhost | ||
) \ | ||
-subj "/CN=localhost" | ||
-keyout for_test.key -out for_test.crt -extensions san -config "$CONFIG" | ||
rm $CONFIG |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// © 2023 SolarWinds Worldwide, LLC. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
//go:build !windows | ||
|
||
package testutils | ||
|
||
import "syscall" | ||
|
||
const ConnectionRefusedError = syscall.ECONNREFUSED |
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,21 @@ | ||
// © 2023 SolarWinds Worldwide, LLC. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
//go:build windows | ||
|
||
package testutils | ||
|
||
import "golang.org/x/sys/windows" | ||
|
||
const ConnectionRefusedError = windows.WSAECONNREFUSED |
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
Oops, something went wrong.
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.
No need to run Lambda-related tests on Windows as it is not supported under Lambda.