Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 Test - Regression test use offline version #794

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-404.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
python default.py -t ${{ matrix.version }} -r -i defaults/sites.json -o data/testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting tests.sitespeed.xvfb=true
python default.py -t ${{ matrix.version }} -r -u https://webperf.se/2f08c/finns-det-en-sida/pa-den-har-adressen/testanrop/?webperf-core-test-2 -o data/testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting tests.sitespeed.xvfb=true --setting tests.page-not-found.override-url=false --setting general.cache.use=true --setting tests.sitespeed.cache.folder=unittests
python .github/workflows/verify_result.py -t ${{ matrix.version }}
- if: ${{ matrix.os == 'windows-latest' }}
name: RUNNING TEST - WINDOWS
run: |
python default.py -t ${{ matrix.version }} -r -i defaults\sites.json -o data\testresult-${{ matrix.version }}.json --setting ${{ matrix.config }}
python default.py -t ${{ matrix.version }} -r -u https://webperf.se/2f08c/finns-det-en-sida/pa-den-har-adressen/testanrop/?webperf-core-test-2 -o data\testresult-${{ matrix.version }}.json --setting ${{ matrix.config }} --setting tests.page-not-found.override-url=false --setting general.cache.use=true --setting tests.sitespeed.cache.folder=unittests
python .github\workflows\verify_result.py -t ${{ matrix.version }}
3 changes: 3 additions & 0 deletions defaults/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
"use": true
}
},
"page-not-found": {
"override-url": true
},
"webbkoll": {
"sleep": 20
}
Expand Down
5 changes: 4 additions & 1 deletion helpers/setting_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@
"mailipv6",
"tests.email.support.ipv6",
"email_network_support_ipv6_traffic",
"EMAIL_NETWORK_SUPPORT_IPV6_TRAFFIC"): "bool|tests.email.support.ipv6"
"EMAIL_NETWORK_SUPPORT_IPV6_TRAFFIC"): "bool|tests.email.support.ipv6",
(
"404url",
"tests.page-not-found.override-url"): "bool|tests.page-not-found.override-url"
}


Expand Down
5 changes: 4 additions & 1 deletion tests/page_not_found.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ def run_test(global_translation, org_url):
print(global_translation('TEXT_TEST_START').format(
datetime.now().strftime('%Y-%m-%d %H:%M:%S')))

url = change_url_to_404_url(org_url)
if get_config('tests.page-not-found.override-url'):
url = change_url_to_404_url(org_url)
else:
url = org_url

# checks http status code and content for url
request_text, code = get_http_content_with_status(url)
Expand Down
1 change: 1 addition & 0 deletions unittests/webperf.se/test-02-no-errors.har

Large diffs are not rendered by default.

Loading