Skip to content

test: exercise resumable upload URL scheme through the real TLS stack - #1690

Open
viacheslav-rostovtsev wants to merge 1 commit into
googleapis:mainfrom
viacheslav-rostovtsev:test/resumable-upload-tls-scheme
Open

viacheslav-rostovtsev wants to merge 1 commit into
googleapis:mainfrom
viacheslav-rostovtsev:test/resumable-upload-tls-scheme

Conversation

@viacheslav-rostovtsev

Copy link
Copy Markdown
Member

TestUploadURLScheme sets r.TLS directly on an httptest request, so it cannot see cmux hiding the *tls.Conn from net/http. The new test starts the server via CreateAllEndpoints with auto-TLS, runs a resumable upload start over HTTP/1.1, asserts the returned upload URL is https://, and finalizes the upload through it. Removing the r.TLS restore in TLSHTTPMiddleware makes it fail with an http:// URL.

TestUploadURLScheme sets r.TLS directly on an httptest request, so it cannot
see cmux hiding the *tls.Conn from net/http. The new test starts the server
via CreateAllEndpoints with auto-TLS, runs a resumable upload start over
HTTP/1.1, asserts the returned upload URL is https://<addr>, and finalizes
the upload through it. Removing the r.TLS restore in TLSHTTPMiddleware makes
it fail with an http:// URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant