Page MenuHomeSoftware Heritage

cypress: Add missing global intercept for https://status.swh.org
ClosedPublic

Authored by anlambert on Mar 15 2022, 5:16 PM.

Details

Summary

Each time a swh-web HTML page is loaded, an HTTP request is sent to
https://status.softwareheritage.org for getting the data needed to
display the status widget in the top right of the Web UI.

That request was not globally intercepted by cypress resulting in
making real HTTP requests on the internet while executing tests.
As a consequence, this was slowing down the whole testing process.

So ensure that request is globally intercepted to speedup tests
execution.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D7353 (id=26573)

Rebasing onto 5bc77709cb...

Current branch diff-target is up to date.
Changes applied before test
commit 2b1ae26939787f7a84a851a1a5f05a0951482b2c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Mar 15 17:07:36 2022 +0100

    cypress: Add missing global intercept for https://status.swh.org
    
    Each time a swh-web HTML page is loaded, an HTTP request is sent to
    https://status.softwareheritage.org for getting the data needed to
    display the status widget in the top right of the Web UI.
    
    That request was not globally intercepted by cypress resulting in
    making real HTTP requests on the internet while executing tests.
    As a consequence, this was slowing down the whole testing process.
    
    So ensure that request is globally intercepted to speedup tests
    execution.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1458/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1458/console

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 15 2022, 5:18 PM
Harbormaster failed remote builds in B27453: Diff 26573!

Build is green

Patch application report for D7353 (id=26573)

Rebasing onto 5bc77709cb...

Current branch diff-target is up to date.
Changes applied before test
commit 2b1ae26939787f7a84a851a1a5f05a0951482b2c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Mar 15 17:07:36 2022 +0100

    cypress: Add missing global intercept for https://status.swh.org
    
    Each time a swh-web HTML page is loaded, an HTTP request is sent to
    https://status.softwareheritage.org for getting the data needed to
    display the status widget in the top right of the Web UI.
    
    That request was not globally intercepted by cypress resulting in
    making real HTTP requests on the internet while executing tests.
    As a consequence, this was slowing down the whole testing process.
    
    So ensure that request is globally intercepted to speedup tests
    execution.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1459/ for more details.

This revision is now accepted and ready to land.Mar 16 2022, 10:12 AM