Skip to content

Commit 4373ff6

Browse files
authored
tests: use self-hosted example.com mirror (#2834)
Change uses of https://example.com/ for crawling with self-hosted mirror at https://example-com.webrecorder.net/ to avoid rate limits or other external errors / issues.
1 parent fe7ca89 commit 4373ff6

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

backend/test/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def sample_crawl_data():
332332
return {
333333
"runNow": False,
334334
"name": "Test Crawl",
335-
"config": {"seeds": [{"url": "https://example.com/"}], "extraHops": 1},
335+
"config": {"seeds": [{"url": "https://example-com.webrecorder.net/"}], "extraHops": 1},
336336
"tags": ["tag1", "tag2"],
337337
}
338338

@@ -558,7 +558,7 @@ def url_list_config_id(crawler_auth_headers, default_org_id):
558558
"config": {
559559
"seeds": [
560560
{"url": "https://webrecorder.net"},
561-
{"url": "https://example.com"},
561+
{"url": "https://example-com.webrecorder.net"},
562562
{"url": "https://specs.webrecorder.net"},
563563
],
564564
"limit": 1,

backend/test/test_collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ def test_list_public_collections(
11101110

11111111
# Enable public profile on org
11121112
public_description = "This is a test public org!"
1113-
public_url = "https://example.com"
1113+
public_url = "https://example-com.webrecorder.net"
11141114

11151115
r = requests.post(
11161116
f"{API_PREFIX}/orgs/{default_org_id}/public-profile",

backend/test/test_crawl_config_profile_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def get_sample_crawl_data(profile_id=None):
88
data = {
99
"runNow": False,
1010
"name": "Test Crawl",
11-
"config": {"seeds": [{"url": "https://example.com/"}]},
11+
"config": {"seeds": [{"url": "https://example-com.webrecorder.net/"}]},
1212
}
1313
if profile_id:
1414
data["profileid"] = profile_id

backend/test/test_crawl_config_tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_sample_crawl_data(tags):
1010
return {
1111
"runNow": False,
1212
"name": "Test Crawl",
13-
"config": {"seeds": [{"url": "https://example.com/"}]},
13+
"config": {"seeds": [{"url": "https://example-com.webrecorder.net/"}]},
1414
"tags": tags,
1515
}
1616

backend/test/test_crawlconfigs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_verify_update(crawler_auth_headers, default_org_id):
221221
assert data["description"] == UPDATED_DESCRIPTION
222222
assert sorted(data["tags"]) == sorted(UPDATED_TAGS)
223223
assert data["autoAddCollections"] == [_coll_id]
224-
assert data["firstSeed"] == "https://example.com/"
224+
assert data["firstSeed"] == "https://example-com.webrecorder.net/"
225225

226226

227227
def test_update_config_invalid_format(
@@ -232,7 +232,7 @@ def test_update_config_invalid_format(
232232
headers=crawler_auth_headers,
233233
json={
234234
"config": {
235-
"seeds": ["https://example.com/"],
235+
"seeds": ["https://example-com.webrecorder.net/"],
236236
"scopeType": "domain",
237237
"limit": 10,
238238
}
@@ -323,7 +323,7 @@ def test_update_config_data(crawler_auth_headers, default_org_id, sample_crawl_d
323323
headers=crawler_auth_headers,
324324
json={
325325
"config": {
326-
"seeds": [{"url": "https://example.com/"}],
326+
"seeds": [{"url": "https://example-com.webrecorder.net/"}],
327327
"scopeType": "domain",
328328
"selectLinks": ["a[href]->href", "script[src]->src"],
329329
"clickSelector": "button",
@@ -353,7 +353,7 @@ def test_update_config_no_changes(
353353
headers=crawler_auth_headers,
354354
json={
355355
"config": {
356-
"seeds": [{"url": "https://example.com/"}],
356+
"seeds": [{"url": "https://example-com.webrecorder.net/"}],
357357
"scopeType": "domain",
358358
"selectLinks": ["a[href]->href", "script[src]->src"],
359359
"clickSelector": "button",
@@ -664,7 +664,7 @@ def test_get_config_seeds(crawler_auth_headers, default_org_id, url_list_config_
664664

665665
EXPECTED_SEED_URLS = [
666666
"https://webrecorder.net/",
667-
"https://example.com/",
667+
"https://example-com.webrecorder.net/",
668668
"https://specs.webrecorder.net/",
669669
]
670670
found_seed_urls = []

0 commit comments

Comments
 (0)