-
Notifications
You must be signed in to change notification settings - Fork 820
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
Return HTTP 201 on GameServerAllocation #2110
Return HTTP 201 on GameServerAllocation #2110
Conversation
Testing with
You can see the 201 on the last line 🥳 |
Build Succeeded 👏 Build Id: 55ecdd05-a60f-4170-94f7-8c959dfcbbb1 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
The standard for CRD creation is to return a HTTP 201 response. The Go client is more flexible and was happy with a 200 response, but the C# client will error out if anything but a 201 response. This fixes things so we send the correct HTTP response code when creating a GameServerAllocation. Closes googleforgames#2108
98ead5a
to
04cd13b
Compare
Build Succeeded 👏 Build Id: f37838a2-d591-45e7-85d9-387c4d7eb847 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
@@ -103,6 +103,7 @@ func TestControllerAllocator(t *testing.T) { | |||
rec := httptest.NewRecorder() | |||
err = c.processAllocationRequest(ctx, rec, r, "default") | |||
assert.NoError(t, err) | |||
assert.Equal(t, http.StatusCreated, rec.Code) |
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.
We shouldn't block this bug fix merging, but it seems like we have a test that covers the other two case statements (using the metav1 status and returning a http.StatusOK
).
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markmandel, roberthbailey The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / Why we need it:
The standard for CRD creation is to return a HTTP 201 response. The Go client is more flexible and was happy with a 200 response, but the C# client will error out if anything but a 201 response.
This fixes things so we send the correct HTTP response code when creating a GameServerAllocation.
Which issue(s) this PR fixes:
Closes #2108
Special notes for your reviewer:
N/A