-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement new conformance test executable (#234)
## Summary **This PR adds a new `ConnectConformanceClient` executable which implements the client-side of the [conformance service](https://buf.build/connectrpc/conformance/file/main:connectrpc/conformance/v1/service.proto) and replaces the existing conformance test scaffolding. The conformance test runner feeds test cases into this executable which subsequently invokes an RPC on a local service for each case and returns the results to the runner which validates the output.** ## Details Connect's [conformance tests repository](https://github.com/connectrpc/conformance) has moved to a new conformance testing strategy: It now provides a conformance test runner that accepts an executable provided by each Connect implementation which exercises its runtime behavior. The test runner performs a matrix of hundreds of tests against a local server in order to validate behaviors with various permutations of protocols, codecs, etc. This approach allows for developing new test scenarios in one place (the conformance test runner/repository) and having all those tests run against each Connect library with little/no changes. These changes allow us to finally remove the Docker dependency from local and CI testing. Tests also run more quickly than before, despite running many more test cases. **Logs indicate that the test runner is running 632 tests with URLSession, and another 1,138 tests with SwiftNIO (which has more combinations since our NIO implementation supports gRPC).** Note: There are a couple of tests that are explicitly opted-out in the `opt-outs.txt` file. This is due to the conformance runner being too strict on base64 encoding for GET requests, and should be fixed in a future release of the runner. ## Other changes - Removes `buf.work.yaml` files - Updates all generated source directories to consistently be named `GeneratedSources` - Adds `@unchecked Sendable` to mock interfaces to silence a warning that appeared when updating them. These must be `@unchecked` because they are meant to be subclassed in mocks - Updates some unit tests to use the new conformance Protobuf files
- Loading branch information
Showing
89 changed files
with
11,175 additions
and
4,643 deletions.
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
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 |
---|---|---|
|
@@ -97,21 +97,29 @@ jobs: | |
run: | | ||
git update-index --refresh --add --remove | ||
git diff-index --quiet HEAD -- | ||
run-connect-tests: | ||
run-conformance-tests: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Set up docker (missing on macOS GitHub runners) | ||
# https://github.com/actions/runner-images/issues/2150 | ||
run: | | ||
brew unlink [email protected] && brew link --overwrite [email protected] | ||
brew install docker colima | ||
colima delete && colima start | ||
- name: Run tests | ||
run: make test | ||
- name: Install conformance runner | ||
run: make installconformancerunner | ||
- name: Run conformance tests | ||
run: make testconformance | ||
run-unit-tests: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21.x | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Run unit tests | ||
run: make testunit | ||
run-swiftlint: | ||
runs-on: ubuntu-latest | ||
container: | ||
|
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 was deleted.
Oops, something went wrong.
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
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
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.