otherwise it's pointless to check in details what has been loaded.
Details
- Reviewers
ardumont - Group Reviewers
Reviewers - Commits
- rDLDSVN2f08b0dfb7d1: test_loader: assert returned loader status is what we expect
Diff Detail
- Repository
- rDLDSVN Subversion (SVN) loader
- Branch
- assert-load
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 12682 Build 19279: Phabricator diff pipeline on jenkins Jenkins console · Jenkins Build 19278: arc lint + arc unit
Event Timeline
Build has FAILED
Patch application report for D3227 (id=11442)
Rebasing onto 20e7618fed...
Current branch diff-target is up to date.
Changes applied before test
commit ea0b24494a3a297c25a1256d52e3914750db7110
Author: David Douard <david.douard@sdfa3.org>
Date: Thu Jun 4 16:23:14 2020 +0200
test_loader: assert returned loader status is what we expect
otherwise it's pointless to check in details what has been loaded.Link to build: https://jenkins.softwareheritage.org/job/DLDSVN/job/tests-on-diff/15/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDSVN/job/tests-on-diff/15/console
Right.
Build has FAILED
Test that fails:
16:35:00 ___________________________ SvnLoaderTest3.test_load ___________________________
16:35:00
16:35:00 self = <swh.loader.svn.tests.test_loader.SvnLoaderTest3 testMethod=test_load>
16:35:00
16:35:00 def test_load(self):
16:35:00 """Load known repository with history altered should do nothing
16:35:00
16:35:00 """
16:35:00 # when
16:35:00 > assert self.loader.load() == {"status": "uneventful"}
16:35:00 E AssertionError: assert {'status': 'failed'} == {'status': 'uneventful'}
16:35:00 E Differing items:
16:35:00 E {'status': 'failed'} != {'status': 'uneventful'}
16:35:00 E Full diff:
16:35:00 E - {'status': 'uneventful'}
16:35:00 E + {'status': 'failed'}It's because, the code changed recently when no snapshot and no revision is
provided when building a snapshot [1]. It now raises when before it did
nothing.
As this load status was not tested properly prior to your diff, the status
change passed undetected.
So I guess, it's fine to change from {"status": "uneventful"} to
{"status": "failed"} for the history altered scenario (as it's most possibly what we
want).
[1] D3208
Build is green
Patch application report for D3227 (id=11477)
Rebasing onto 20e7618fed...
Current branch diff-target is up to date.
Changes applied before test
commit 2f08b0dfb7d1e9fd05050c37de6f60acef434388
Author: David Douard <david.douard@sdfa3.org>
Date: Thu Jun 4 16:23:14 2020 +0200
test_loader: assert returned loader status is what we expect
otherwise it's pointless to check in details what has been loaded.
For SvnLoaderTest3.test_load(), the uneventful->failed change is
needed due to recent change introduced by a1a10d2da8e6.See https://jenkins.softwareheritage.org/job/DLDSVN/job/tests-on-diff/16/ for more details.