-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update GQLgen test client to work with multipart form data (take 2) #1661
Update GQLgen test client to work with multipart form data (take 2) #1661
Commits on Oct 15, 2021
-
Update GQLgen test client to work with multipart form data
Update the GQLgen to support multipart form data, like those present within the fileupload examples. - Add missing space between "unsupported encoding " and failing content-type header error (cherry picked from commit 101842f)
Configuration menu - View commit details
-
Copy full SHA for 92eb97d - Browse repository at this point
Copy the full SHA 92eb97dView commit details -
Add WithFiles client option for fileupload GQLgen client tests
Add a `WithFiles` GQLgen client option to support the fileupload input within tests, using the core Golang `os` package and File type, which converts `os.File`s to their appropriate multipart form data within a request. - If there are no files this should just simply convert a `application/json` Content-Type to supported `multipart/form-data` (cherry picked from commit 08ef942)
Configuration menu - View commit details
-
Copy full SHA for 550c512 - Browse repository at this point
Copy the full SHA 550c512View commit details -
Update fileupload test to use GQLgen test client
Update the fileupload test to use the GQLgen test client and `WithFiles` option to remove the need for `createUploadRequest` helper with raw http posts - Fix setting the Content Type by using the appropriate `http` package function to dectect it + https://godoc.org/net/http#DetectContentType (cherry picked from commit 5e573d5)
Configuration menu - View commit details
-
Copy full SHA for ac4c3f6 - Browse repository at this point
Copy the full SHA ac4c3f6View commit details -
Update WithFiles option test with multipart Reader
(cherry picked from commit 6dfa3cb)
Configuration menu - View commit details
-
Copy full SHA for 79e5a8e - Browse repository at this point
Copy the full SHA 79e5a8eView commit details -
Update file upload tests
WithFiles
optionUpdate the file upload tests to use the GQL test client and its `WithFiles` option to remove the need for a custom raw HTTP post request builder `createUploadRequest`. - Also update `WithFiles` option to group & map identical files; e.g. ``` { "0": ["variables.req.0.file", "variables.req.1.file"] } ``` (cherry picked from commit 486d9f1)
Configuration menu - View commit details
-
Copy full SHA for c10460b - Browse repository at this point
Copy the full SHA c10460bView commit details -
Make sure
WithFiles
does not add duplicates to multipart form data(cherry picked from commit 0c2364d)
Configuration menu - View commit details
-
Copy full SHA for ddb69c7 - Browse repository at this point
Copy the full SHA ddb69c7View commit details -
Fix use of byte vs string in
WithFiles
tests(cherry picked from commit ba10b5b)
Configuration menu - View commit details
-
Copy full SHA for 27f3e11 - Browse repository at this point
Copy the full SHA 27f3e11View commit details -
Fix strict withFiles option test for race conditions
Fix a problem with how strict the test's expected response was for tests with files in their request, since it always expected a strict order of files input that is somewhat random or dependent on what OS it is running the test on and/or race condition
Configuration menu - View commit details
-
Copy full SHA for f157b66 - Browse repository at this point
Copy the full SHA f157b66View commit details