Page MenuHomeSoftware Heritage

tests/api/origin_save: Explicitely populate SaveAuthorizedOrigin table
ClosedPublic

Authored by anlambert on Apr 22 2021, 3:32 PM.

Details

Summary

The use of django-test-migrations have some unexpected side effect
when building the debian package of swh-web, some default data
added to the SaveAuthorizedOrigin table in initial migrations
end up missing.

So ensure to explicitely fill that table with needed tests data
to avoid some test failures.

Related to T3266

I also added a commit to silent a distutils related warning.

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

ardumont added a subscriber: ardumont.

Thanks.

pytest.ini
11 ↗(On Diff #19924)

ah nice, thx.

This revision is now accepted and ready to land.Apr 22 2021, 3:34 PM

Build is green

Patch application report for D5575 (id=19924)

Rebasing onto 85253bc88f...

Current branch diff-target is up to date.
Changes applied before test
commit a65bc357b70718025474cf3be1dbec8f9113a5d8
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Apr 22 15:31:02 2021 +0200

    pytest.ini: Silent annoying warning
    
    Pytest report when building debian package is not easily exploitable
    without silenting that warning.

commit 2a35b545b88278fb427756d4884b588bcd347455
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Apr 22 15:27:02 2021 +0200

    tests/api/origin_save: Explicitely populate SaveAuthorizedOrigin table
    
    The use of django-test-migrations have some unexpected side effect
    when building the debian package of swh-web, some default data
    added to the SaveAuthorizedOrigin table in initial migrations
    end up missing.
    
    So ensure to explicitely fill that table with needed tests data
    to avoid some test failures.
    
    Related to T3266

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