Skip to content
Snippets Groups Projects
Commit 69810f43 authored by Julian Rother's avatar Julian Rother
Browse files

Started implementing smoke tests, closes #236

parent 1045a7fb
No related branches found
No related tags found
No related merge requests found
#!/bin/env python3
import requests
import sys
failed = 0
def checkurl(path, ignore=False, status=200):
global failed
for prefix in ['http://videoag.fsmpi.rwth-aachen.de', 'https://videoag.fsmpi.rwth-aachen.de', 'https://video.fsmpi.rwth-aachen.de', 'https://video.rwth-aachen.de', 'https://rwth.video']:
req = requests.head(prefix+path, allow_redirects=True)
if req.status_code != status:
if ignore:
print('[urlcheck_legacy]', 'Warning:', req.status_code, prefix+path)
else:
print('[urlcheck_legacy]', 'Error:', req.status_code, prefix+path)
failed += 1
checkurl('/')
checkurl('/site/feed.php?newcourses')
checkurl('/?view=faq')
checkurl('/site/feed.php?all')
checkurl('/?course=16ws-progra')
checkurl('/?view=player&lectureid=7319')
checkurl('/pub/16ws-progra/16ws-progra-161019-1080p.mp4')
checkurl('/site/feed.php?16ws-afi')
checkurl('/site/embed.php?vid=6088')
checkurl('/site/embed.php?lecture=7319')
if failed:
sys.stderr.write('[urlcheck_legacy] '+str(failed)+' checks failed')
sys.exit(1)
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment