Closed Bug 1366071 Opened 7 years ago Closed 7 years ago

Add check to talos tp6 to ensure mitmproxy certificate was installed

Categories

(Testing :: Talos, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: rwood, Assigned: rwood)

References

Details

(Whiteboard: [PI:August])

Attachments

(1 file)

Improve the talos mitmproxy support (Bug 1357382) by adding a check to verify that the mitmproxy CA certificate was installed into Firefox. The code to install the cert is implemented, but we need a check after because without the certificate mitdump playback won't work with Firefox.

/testing/talos/talos/run_tests.py:is_mitmproxy_cert_installed()
Whiteboard: [PI:June]
Whiteboard: [PI:June] → [PI:August]
Assignee: nobody → rwood
Status: NEW → ASSIGNED
Summary: Add check to ensure mitmproxy certificate was installed → Add check to talos tp6 to ensure mitmproxy certificate was installed
Comment on attachment 8899968 [details]
Bug 1366071 - Add check in talos tp6 to ensure mitmproxy certificate was installed successfully;

https://reviewboard.mozilla.org/r/171294/#review176710

::: testing/talos/talos/mitmproxy/mitmproxy.py:84
(Diff revision 1)
> +        certificate = _read_certificate(DEFAULT_CERT_PATH)
> +        contents = read_autoconfig_file(browser_install)
> +        if (MITMPROXY_SETTINGS % {'cert': certificate}) in contents:
> +            LOG.info("Verified mitmproxy CA certificate is installed in Firefox")
> +        else:
> +            return False

should we add more info here to expand on the failure  so we don't have to guess what was in the contents?
Attachment #8899968 - Flags: review?(jmaher) → review+
(In reply to Joel Maher ( :jmaher) (UTC-5) from comment #3)
> Comment on attachment 8899968 [details]
> Bug 1366071 - Add check in talos tp6 to ensure mitmproxy certificate was
> installed successfully;
> 
> https://reviewboard.mozilla.org/r/171294/#review176710
> 
> ::: testing/talos/talos/mitmproxy/mitmproxy.py:84
> (Diff revision 1)
> > +        certificate = _read_certificate(DEFAULT_CERT_PATH)
> > +        contents = read_autoconfig_file(browser_install)
> > +        if (MITMPROXY_SETTINGS % {'cert': certificate}) in contents:
> > +            LOG.info("Verified mitmproxy CA certificate is installed in Firefox")
> > +        else:
> > +            return False
> 
> should we add more info here to expand on the failure  so we don't have to
> guess what was in the contents?

Ok will do, thanks for the review!
Pushed by rwood@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ebbe081e9554
Add check in talos tp6 to ensure mitmproxy certificate was installed successfully; r=jmaher
https://hg.mozilla.org/mozilla-central/rev/ebbe081e9554
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: