| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@BenWhitehead, @crwilcox, I've used the code generated by Alex Vaskman (see the generation configurations PR), to run tests. They are okay:
I've written the code in Datastore fashion for now. Ready for any changes requests. |
Sorry, something went wrong.
|
I think it's okay to not have tests for the export/import calls, since those are LongRunningOperations and depend on bucket access/config. |
Sorry, something went wrong.
|
I think we should add a test. For bucket access and config, please tell us the requirements. We can set it up. |
Sorry, something went wrong.
|
Hey @tmatsuo, This is the quick list of what I believe would be needed to run import/export integration tests:
|
Sorry, something went wrong.
We're already using a storage bucket specified in CLOUD_STORAGE_BUCKET envvar. On Kokoro, this is set to python-docs-samples-tests bucket. I hope you can just use it. Re: permission I added those permissions to the service accounts. I think Storage Object Admin is enough, instead of Storage Admin, so I only applied Storage Object Admin on the bucket to the app engine default service account. Let me know if we actually need Storage Admin. |
Sorry, something went wrong.
|
Can you also update the required env vars and permissions to run the tests in the README file? Actually you'll need to update README.rst.in and run the readmegen nox session to re-generate the README.rst file. I think you can use required_role and other_required_steps field in that file (Example usage). |
Sorry, something went wrong.
|
@BenWhitehead, @tmatsuo, looks like we were provided with all the necessary permissions in our project, thanks. I've run the tests locally - they're okay (I assume on kokoro they'll be failing until the next Datastore release): I've unioned import and export tests as it's easier to run them sequentially and use the results of the export as an argument for import. Hope it's okay. And, if I understood correctly, this CLOUD_STORAGE_BUCKET already exists in samples kokoro environment, so I don't need to create/delete it on every test run.
Pushed. There is no noxfile.py in datastore directory by the way. Should be generated I guess. |
Sorry, something went wrong.
|
Thanks, @crwilcox! All the files are there now. I suppose only renovate PR is left, and kokoro checks will become green. |
Sorry, something went wrong.
|
@IlyaFaer FYI, I think the test will automatically executed if you join googlecloudplatform org. |
Sorry, something went wrong.
|
@IlyaFaer looks like there are some test bootstrapping issues ==================================== ERRORS ====================================
____________ ERROR collecting datastore/cloud-client/admin_test.py _____________
ImportError while importing test module '/workspace/datastore/cloud-client/admin_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
admin_test.py:19: in <module>
import admin
admin.py:15: in <module>
from google.cloud.datastore_admin_v1.gapic import datastore_admin_client
E ModuleNotFoundError: No module named 'google.cloud.datastore_admin_v1.gapic'
----- generated xml file: /workspace/datastore/cloud-client/sponge_log.xml -----
=========================== short test summary info ============================
ERROR admin_test.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.51s ===============================
|
Sorry, something went wrong.
|
@BenWhitehead, @crwilcox, I've updated the branch with renovate PR changes. Now another error appeared: ____________ ERROR collecting datastore/cloud-client/admin_test.py _____________
Traceback (most recent call last):
File "/workspace/datastore/cloud-client/admin_test.py", line 19, in <module>
import admin
File "/workspace/datastore/cloud-client/admin.py", line 15, in <module>
from google.cloud.datastore_admin_v1.gapic import datastore_admin_client
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/google/cloud/datastore_admin_v1/__init__.py", line 23, in <module>
from google.cloud.datastore_admin_v1.gapic import datastore_admin_client
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/google/cloud/datastore_admin_v1/gapic/datastore_admin_client.py", line 48, in <module>
"google-cloud-datastore-admin",
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 481, in get_distribution
dist = get_provider(dist)
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 357, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'google-cloud-datastore-admin' distribution was not found and is required by the applicationI suspect the problem caused with the generated lines: There is no such a Python package google-cloud-datastore-admin. |
Sorry, something went wrong.
|
@tmatsuo, @crwilcox, @BenWhitehead, all the checks are green 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #4120