Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.loader.svn.tests.test_loader::test_loader_svn_with_symlink
Failed

TEST RESULT

Run At
Jul 17 2020, 10:42 AM
Details
swh_config = '/tmp/pytest-of-jenkins/pytest-0/test_loader_svn_with_symlink0/loader.yml' datadir = '/var/lib/jenkins/workspace/DLDSVN/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/loader/svn/tests/data' tmp_path = PosixPath('/tmp/pytest-of-jenkins/pytest-0/test_loader_svn_with_symlink0') def test_loader_svn_with_symlink(swh_config, datadir, tmp_path): """Repository with symlinks should be ingested ok Edge case: - first create a file and commit it. Remove it, then add folder holding the same name, commit. - do the same scenario with symbolic link (instead of file) """ archive_name = "pkg-gourmet" archive_path = os.path.join( datadir, "pkg-gourmet-with-edge-case-links-and-files.tgz" ) repo_url = prepare_repository_from_archive(archive_path, archive_name, tmp_path) loader = SvnLoader(repo_url) assert loader.load() == {"status": "eventful"} expected_snapshot = { "id": GOURMET_EDGE_CASES_SNAPSHOT, "branches": { "HEAD": { "target": "3f43af2578fccf18b0d4198e48563da7929dc608", "target_type": "revision", } }, } > check_snapshot(expected_snapshot, loader.storage) .tox/py3/lib/python3.7/site-packages/swh/loader/svn/tests/test_loader.py:501: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/loader/tests/__init__.py:139: in check_snapshot snapshot = Snapshot.from_dict(snapshot) .tox/py3/lib/python3.7/site-packages/swh/model/model.py:370: in from_dict for (name, branch) in d.pop("branches").items() .tox/py3/lib/python3.7/site-packages/swh/model/collections.py:27: in __init__ self.data = tuple(data) .tox/py3/lib/python3.7/site-packages/swh/model/model.py:370: in <genexpr> for (name, branch) in d.pop("branches").items() .tox/py3/lib/python3.7/site-packages/swh/model/model.py:344: in from_dict return cls(target=d["target"], target_type=TargetType(d["target_type"])) <attrs generated init swh.model.model.SnapshotBranch>:6: in __init__ __attr_validator_target(self, __attr_target, self.target) .tox/py3/lib/python3.7/site-packages/attr/_make.py:2146: in __call__ v(inst, attr, value) .tox/py3/lib/python3.7/site-packages/attrs_strict/_type_validation.py:95: in _validator _validate_elements(attribute, field, attribute.type) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ attribute = Attribute(name='target', default=NOTHING, validator=_AndValidator(_validators=(<function type_validator.<locals>._vali...True, order=True, hash=None, init=True, metadata=mappingproxy({}), type=<class 'bytes'>, converter=None, kw_only=False) value = '3f43af2578fccf18b0d4198e48563da7929dc608' expected_type = <class 'bytes'> def _validate_elements(attribute, value, expected_type): if expected_type is None: return base_type = _get_base_type(expected_type) if base_type == typing.Any: return if isinstance(base_type, (str, ForwardRef)): # These base_types happen when you have string annotations and cannot # be used in isinstance. raise _StringAnnotationError() if base_type != typing.Union and not isinstance( # type: ignore value, base_type ): > raise AttributeTypeError(value, attribute) E attrs_strict._error.AttributeTypeError: target must be <class 'bytes'> (got 3f43af2578fccf18b0d4198e48563da7929dc608 that is a <class 'str'>) .tox/py3/lib/python3.7/site-packages/attrs_strict/_type_validation.py:120: AttributeTypeError