-
Notifications
You must be signed in to change notification settings - Fork 83
tests: re-enable cross-language conformance tests #205
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
76f6165
tests: rename cross-language tests module to run
tseaver 1bb29ec
chore: drop v1beta1 makefile
tseaver 29faa4e
chore: generate conftest messages using gapic-generator-python
tseaver 143a7dc
chore: update conftest parsing to accomodate proto-plus
tseaver 9cdd1a4
chore: copy in latest version of conftests from upstream repo
tseaver c488384
chore: restore old conftest JSON files
tseaver 55a2e04
chore: blacken
tseaver 15e0108
tests: get cross-language conftests working on 'master'
tseaver 0e4270b
fix: use proto-plus message 'wrap' method for clarity
tseaver 9e9ec48
Merge branch 'master' into 95-tests-reenable_conformance_tests
tseaver dbc8ca8
tests: move generated conftest module to 'tests/unit/v1'
tseaver 384cce2
Merge branch 'master' into 95-tests-reenable_conformance_tests
crwilcox 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 hidden or 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 |
|---|---|---|
|
|
@@ -11,30 +11,51 @@ GOOGLEAPIS_REPO = $(REPO_DIR)/googleapis | |
| TESTS_REPO = $(REPO_DIR)/conformance-tests | ||
| TEST_PROTO_DIR = $(TESTS_REPO)/firestore/v1 | ||
| TEST_PROTO_SRC = $(TEST_PROTO_DIR)/proto/google/cloud/conformance/firestore/v1/tests.proto | ||
| TESTDATA_DIR = `pwd`/tests/unit/v1/testdata/ | ||
|
|
||
| TMPDIR = /tmp/python-fs-proto | ||
| TMPDIR_FS = $(TMPDIR)/google/cloud/firestore_v1/proto | ||
| TMPDIR_FS = $(TMPDIR)/google/cloud/firestore_v1/types | ||
| TEST_PROTO_COPY = $(TMPDIR_FS)/tests.proto | ||
| TEST_GEN_OUT = tests/unit/v1/conformance_tests.py | ||
| OUTDIR = /tmp/python-fs-gen | ||
|
|
||
| .PHONY: sync-protos gen-protos | ||
| .PHONY: sync-protos gen-protos docker-pull | ||
|
|
||
| gen-protos: sync-protos tweak-protos | ||
| # TODO(jba): Put the generated proto somewhere more suitable. | ||
| $(PROTOC) --python_out=. \ | ||
| -I $(TMPDIR) \ | ||
| -I $(PROTOBUF_REPO)/src \ | ||
| -I $(GOOGLEAPIS_REPO) \ | ||
| $(TEST_PROTO_COPY) | ||
| gen-protos: sync-protos tweak-protos docker-pull gen-protos-raw | ||
|
|
||
| gen-protos-raw: | ||
| mkdir -p $(OUTDIR) | ||
| docker run \ | ||
| --mount type=bind,source=$(TMPDIR),destination="/in",readonly \ | ||
| --mount type=bind,source=$(OUTDIR),destination="/out" \ | ||
| --rm \ | ||
| --user `id -u`:`id -g` \ | ||
| gcr.io/gapic-images/gapic-generator-python | ||
| cp $(OUTDIR)/google/cloud/firestore_v1/types/tests.py \ | ||
| $(TEST_GEN_OUT) | ||
| sed -i -e \ | ||
| "s@package='google.cloud.firestore_v1'@package='tests.unit.v1'@" \ | ||
| $(TEST_GEN_OUT) | ||
|
|
||
| tweak-protos: | ||
| mkdir -p $(TMPDIR_FS) | ||
| cp $(GOOGLEAPIS_REPO)/google/firestore/v1/*.proto $(TMPDIR_FS) | ||
| sed -i -e 's@google/firestore/v1@google/cloud/firestore_v1/proto@' $(TMPDIR_FS)/*.proto | ||
| sed -i -e 's@google/firestore/v1@google/cloud/firestore_v1/types@' $(TMPDIR_FS)/*.proto | ||
| sed -i -e 's@package google\.firestore\.v1@package google.cloud.firestore_v1@' $(TMPDIR_FS)/*.proto | ||
| cp $(TEST_PROTO_SRC) $(TEST_PROTO_COPY) | ||
| sed -i -e 's@package google.cloud.conformance.firestore.v1@package google.cloud.firestore_v1.proto@' $(TEST_PROTO_COPY) | ||
| sed -i -e 's@google/firestore/v1@google/cloud/firestore_v1/proto@' $(TEST_PROTO_COPY) | ||
| sed -i -e 's@package google\.cloud\.conformance\.firestore\.v1@package google.cloud.firestore_v1@' $(TEST_PROTO_COPY) | ||
| sed -i -e 's@google/firestore/v1@google/cloud/firestore_v1/types@' $(TEST_PROTO_COPY) | ||
| sed -i -e 's@google\.firestore\[email protected]_v1@' $(TEST_PROTO_COPY) | ||
| sed -i -e 's@Cursor@Cursor_@' $(TEST_PROTO_COPY) | ||
|
|
||
| sync-protos: | ||
| cd $(PROTOBUF_REPO); git pull | ||
| cd $(GOOGLEAPIS_REPO); git pull | ||
| cd $(TESTS_REPO); git pull | ||
|
|
||
| docker-pull: | ||
| docker pull gcr.io/gapic-images/gapic-generator-python:latest | ||
|
|
||
| copy-testdata: | ||
| rm $(TESTDATA_DIR)/*.json | ||
| cp $(TEST_PROTO_DIR)/*.json $(TESTDATA_DIR)/ | ||
This file was deleted.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.