Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/data.py
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | for origin in _TEST_ORIGINS: | ||||
origin_repo_archive = \ | origin_repo_archive = \ | ||||
os.path.join(os.path.dirname(__file__), | os.path.join(os.path.dirname(__file__), | ||||
'resources/repos/%s' % archive) | 'resources/repos/%s' % archive) | ||||
loader.load(origin['url'], origin_repo_archive, | loader.load(origin['url'], origin_repo_archive, | ||||
origin['visit_date'][i]) | origin['visit_date'][i]) | ||||
origin.update(storage.origin_get(origin)) # add an 'id' key if enabled | origin.update(storage.origin_get(origin)) # add an 'id' key if enabled | ||||
for i in range(250): | |||||
url = 'https://many.origins/%d' % (i+1) | |||||
anlambert: You should add a visit to each origin (pointing to the empty snapshot for instance).
When… | |||||
storage.origin_add([{'url': url}]) | |||||
visit = storage.origin_visit_add(url, '2019-12-03 13:55:05', 'tar') | |||||
storage.origin_visit_update( | |||||
url, visit['visit'], | |||||
snapshot='1a8893e6a86f444e8be8e7bda6cb34fb1735a00e') | |||||
contents = set() | contents = set() | ||||
directories = set() | directories = set() | ||||
revisions = set() | revisions = set() | ||||
releases = set() | releases = set() | ||||
snapshots = set() | snapshots = set() | ||||
content_path = {} | content_path = {} | ||||
▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines |
You should add a visit to each origin (pointing to the empty snapshot for instance).
When executing cypress tests for origins search, the api/1/origin/(origin_url)/visit/latest/ endpoint will be
queried for each origin and currently all requests end up with 404. This is not critical but this generates
a lot of noise in cypress logs.