-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move grpc tests into examples folder
skip running grpc on 3.6 due to protobuf error 3.6 passing locally on macos and on cirrus cli linux
- Loading branch information
Showing
26 changed files
with
64 additions
and
146 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
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
examples/area_calculator/requirements.txt → examples/grpc/requirements.txt
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
grpcio==1.48.2; python_version < '3.7' | ||
grpcio==1.56.2; python_version >= '3.7' | ||
grpcio-tools==1.48.2; python_version < '3.7' | ||
grpcio-tools==1.56.2; python_version >= '3.7 | ||
grpcio-tools==1.56.2; python_version >= '3.7' |
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,4 @@ | ||
#!/bin/bash | ||
set -o pipefail | ||
|
||
pytest |
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,31 @@ | ||
from sys import version_info | ||
from time import sleep | ||
import pytest | ||
from pact import VerifierV3 | ||
import subprocess | ||
from pact.ffi.verifier import VerifyStatus | ||
|
||
@pytest.mark.skipif( | ||
version_info < (3, 7), | ||
reason="https://stackoverflow.com/questions/71759248/importerror-cannot-import-name-builder-from-google-protobuf-internal") | ||
def test_grpc_local_pact(): | ||
|
||
grpc_server_process = subprocess.Popen(['python', 'area_calculator_server.py'], | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.STDOUT, universal_newlines=True) | ||
|
||
# grpc_server_process = subprocess.Popen(['python', 'area_calculator_server.py'], | ||
# cwd=join(dirname(__file__), '..', '..', 'examples', 'area_calculator'), | ||
# stdout=subprocess.PIPE, | ||
# stderr=subprocess.STDOUT, universal_newlines=True) | ||
sleep(3) | ||
|
||
verifier = VerifierV3(provider="area-calculator-provider-example", | ||
provider_base_url="tcp://127.0.0.1:37757", | ||
) | ||
result = verifier.verify_pacts( | ||
sources=["../pacts/grpc-consumer-python-area-calculator-provider.json"], | ||
) | ||
grpc_server_process.terminate() | ||
assert VerifyStatus(result.return_code) == VerifyStatus.SUCCESS | ||
# TODO - Plugin success or failure not returned in logs |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
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