Fix mis-named argument in ProxyCacheUser

VERIFIED FIXED

Status

Cloud Services
Server: Core
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: rfkelly, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa+])

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Created attachment 748609 [details] [diff] [review]
fix mis-named argument in ProxyCacheUser

ProxyCacheUser calls SQLUser.create_user() with an argument named "mail", but it expects an argument named "email".  Which it will confusingly translate back into a user attribute named "mail".

The fix is simple, and I'm posting it independently in order to unblock the deployment in Bug 866568.  I've run a local version of the deployment and confirmed that this new code can successfully proxy-authenticate the cuserX users from stage, so it should be good to go for the loadtest.

However, this highlights the lack of testcases for the ProxyCacheUser code.  It's fiddly to test because it makes a HTTP call, and we don't have a terribly good story for mocking those out.  I'll look into adding some tests in a separate patch.
Attachment #748609 - Flags: review?(telliott)
(Reporter)

Updated

5 years ago
Blocks: 866568
(Reporter)

Comment 1

5 years ago
Created attachment 748611 [details] [diff] [review]
testsuite for ProxyCacheUser

And here's a basic testsuite.  Turns out we already have some hooks for mocking http, it's just not obvious because wsgi_intercept is not listed in the dependencies.
Attachment #748611 - Flags: review?(telliott)
Attachment #748609 - Flags: review?(telliott) → review+
Whiteboard: [qa+]
(Reporter)

Comment 2

5 years ago
http://hg.mozilla.org/services/server-core/rev/cf0d6e5efc3d
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
OK. Verified in code looking at latest server-full/server-core.
Status: RESOLVED → VERIFIED
Attachment #748611 - Flags: review?(telliott) → review+
You need to log in before you can comment on or make changes to this bug.