-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Using generated apitools client for storage uploads #850
Conversation
Also adding - script to generate files - sed line to fix up imports - pep8 and pylint settings to ignore gen'd files
upload = transfer.Upload.FromStream(file_obj, content_type, | ||
total_bytes, | ||
chunksize=self.chunk_size) | ||
# @craigcitro, can I put `callback` and `finish_callback` here? |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
which tests were failing (other than the linter)? |
I don't think we should worry about which tests are failing. We just need to write new tests with your replay/record framework. The issue being that we'll want to have the same types of things covered, e.g. multipart and resumable and media and similar. |
@craigcitro What say you about the replay/record testing features? |
just imported them into apitools last night; was doing some related cleanup (eg that PR you just LGTMd), and i'm going to cut a release. planning on sending you a few follow-up commits on top of these. |
That's awesome! Can't wait. |
@craigcitro Updates here? |
apitools release is cut, but then this has been back-burnered. hoping to get to it today/tomorrow while some longer jobs are running. |
Cool. Someday maybe |
actually, it turned out i didn't really need any of the mocking code i added: the existing mocks already had sufficient coverage, i just needed to do a little cleanup. i've pushed an extra commit to a branch in my fork; i'm happy to do whatever's most convenient for getting you unblocked. two thoughts:
|
@craigcitro The values you swapped in aren't the values we expected based on the inputs. This is why I wanted to ditch our existing tests and use something that you have used to test |
as mentioned on the commit comments, no one's threading the desired api endpoint into apitools, so there's no way it could know what address the tests were expecting. i guess i don't see the point of the current tests -- is there a use case where you'd point gcloud-python at something other than a google API? you're welcome to rewrite the tests, but i don't have the time to do that, i'm afraid. the apitools mocking framework doesn't support much for media testing, unfortunately. it's designed to allow record/replay of API calls, but only has some as-yet-unused media hooks. |
Can you point me towards the record/replay? |
This is very much dead in light of #935 |
See #848
@craigcitro As we discussed this is the "testing sucks" "progress" I've made so far.
Positive outlook: The regression test passes