-
Notifications
You must be signed in to change notification settings - Fork 79
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
Switch description from query parameter to form data sending deploy description to dag server #1726
Changes from 3 commits
0506215
9b39ddf
16528a5
54d5b36
0bc0c2b
669c2b6
a267adc
23ce940
bbc20ee
69568a6
cdac85c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -632,6 +632,7 @@ func (s *Suite) TestUploadFile() { | |
TargetURL: "http://localhost:8080/upload", | ||
FormFileFieldName: "file", | ||
Headers: map[string]string{}, | ||
Description: "This is a test description", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should also include a test with the description set to an empty string and Jeremy's comment to ensure regression is intact. |
||
MaxTries: 3, | ||
InitialDelayInMS: 1 * 1000, | ||
BackoffFactor: 2, | ||
|
@@ -660,6 +661,7 @@ func (s *Suite) TestUploadFile() { | |
TargetURL: "testURL", | ||
FormFileFieldName: "file", | ||
Headers: map[string]string{}, | ||
Description: "This is a test description", | ||
MaxTries: 3, | ||
InitialDelayInMS: 1 * 1000, | ||
BackoffFactor: 2, | ||
|
@@ -688,6 +690,7 @@ func (s *Suite) TestUploadFile() { | |
TargetURL: "testURL", | ||
FormFileFieldName: "file", | ||
Headers: map[string]string{}, | ||
Description: "This is a test description", | ||
MaxTries: 3, | ||
InitialDelayInMS: 1 * 1000, | ||
BackoffFactor: 2, | ||
|
@@ -721,6 +724,7 @@ func (s *Suite) TestUploadFile() { | |
TargetURL: testServer.URL, | ||
FormFileFieldName: "file", | ||
Headers: headers, | ||
Description: "This is a test description", | ||
MaxTries: 2, | ||
InitialDelayInMS: 1 * 1000, | ||
BackoffFactor: 2, | ||
|
@@ -756,6 +760,7 @@ func (s *Suite) TestUploadFile() { | |
TargetURL: testServer.URL, | ||
FormFileFieldName: "file", | ||
Headers: headers, | ||
Description: "This is a test description", | ||
MaxTries: 2, | ||
InitialDelayInMS: 1 * 1000, | ||
BackoffFactor: 2, | ||
|
@@ -782,6 +787,7 @@ func (s *Suite) TestUploadFile() { | |
TargetURL: "https://astro.unit.test", | ||
FormFileFieldName: "file", | ||
Headers: map[string]string{}, | ||
Description: "This is a test description", | ||
MaxTries: 2, | ||
InitialDelayInMS: 1 * 1000, | ||
BackoffFactor: 2, | ||
|
@@ -814,6 +820,7 @@ func (s *Suite) TestUploadFile() { | |
TargetURL: server.URL, | ||
FormFileFieldName: "file", | ||
Headers: headers, | ||
Description: "This is a test description", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we update this test case to check the contents of the request, to verify the file contents and the description are in there? |
||
MaxTries: 2, | ||
InitialDelayInMS: 1 * 1000, | ||
BackoffFactor: 2, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only tested for no description. I was unable to fully test the description. When logging the request body just before and after this line
response, err := client.Do(req)
, I noticed that no data is logged after the request is sent.Given this, simulating and testing for the description field and even file did not quite work.