-
Notifications
You must be signed in to change notification settings - Fork 16
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
PXP-11248 PXP-11258 "POST /auth/mapping" anonymous support #164
Conversation
arborist/server_test.go
Outdated
@@ -3243,7 +3250,19 @@ func TestServer(t *testing.T) { | |||
w := httptest.NewRecorder() | |||
req := newRequest("POST", "/auth/mapping", nil) | |||
handler.ServeHTTP(w, req) | |||
assert.Equal(t, w.Code, http.StatusBadRequest, "expected a 400 response") | |||
assert.Equal(t, w.Code, http.StatusOK, "expected a 200 OK") |
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.
from what I can see 3117 - 2129 and 3253 - 3265 seem to be the same set of code. Would it be possible to encapsulate this behavior in a separate function?
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.
updated
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.
lgtm 👍
PXP-11248 PXP-11258 "POST /auth/mapping" anonymous support (uc-cdis#164)
Jira Tickets: PXP-11248 and PXP-11258
Update to #163
Goes with uc-cdis/guppy#254
Reason for this change: uc-cdis/guppy#254 (comment)
Tested in QA - Arborist logs when logic from uc-cdis/guppy#254 kicks in:
New Features
POST /auth/mapping
: return "anonymous" access when the user is unauthenticated, matching the behavior of theGET /auth/mapping
endpoint (previously thePOST
endpoint returned an error in this case)