Page MenuHomeSoftware Heritage

loader/opam/tests: Do not run actual opam init command call
ClosedPublic

Authored by ardumont on Feb 25 2022, 10:09 AM.

Details

Summary

Instead, this fixes the pseudo fake opam root present in tests datadir folder to the
right structure and then installs it properly for the test to use.

Another benefit from this is now inhibiting any actual network happening during the opam
init cli call.

This also reverts the previous commit which added a --yes in the opam init cli.
This was not working and not the right solution in the end.

Related to T3973

Test Plan

tox

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
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 D7255 (id=26287)

Rebasing onto ec6591f6a9...

Current branch diff-target is up to date.
Changes applied before test
commit eff49575a690e13e553e3c827cdf60b4f0497404
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Feb 25 10:06:43 2022 +0100

    loader/opam/tests: Do not run actual opam init command call
    
    Instead, this fixes the pseudo fake opam root present in tests datadir folder to the
    right structure and then installs it properly for the test to use.
    
    Another benefit from this is now inhibiting any actual network happening during the opam
    init cli call.
    
    This also reverts the previous commit which added a --yes in the opam init cli.
    This was not working and not the right solution in the end.
    
    Related to T3973

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 25 2022, 10:12 AM
Harbormaster failed remote builds in B27160: Diff 26287!

Build is green

Patch application report for D7255 (id=26288)

Rebasing onto ec6591f6a9...

Current branch diff-target is up to date.
Changes applied before test
commit 5c11fe2ef48b410edc8a0da890300118a87ffdfb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Feb 25 10:06:43 2022 +0100

    loader/opam/tests: Do not run actual opam init command call
    
    Instead, this fixes the pseudo fake opam root present in tests datadir folder to the
    right structure and then installs it properly for the test to use.
    
    Another benefit from this is now inhibiting any actual network happening during the opam
    init cli call.
    
    This also reverts the previous commit which added a --yes in the opam init cli.
    This was not working and not the right solution in the end.
    
    Related to T3973

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

swh/loader/package/opam/loader.py
168

Revert previous commit D7248 (which did not work)

This revision was not accepted when it landed; it landed in state Needs Review.Feb 25 2022, 10:24 AM
This revision was automatically updated to reflect the committed changes.