Add a smoke test
Upstreamed from rhel's Sanity/smoke Commit hash: a3e2fcfaef1fe4ffa257bdc21d535c9cdc35cafd Only the test file was kept. Co-Authored-By: Braňo Náter <bnater@redhat.com>
This commit is contained in:
parent
9ef9d7a5d6
commit
a7b7620632
4 changed files with 19 additions and 0 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
4
plans.fmf
Normal file
4
plans.fmf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
5
tests/smoke/smoke.fmf
Normal file
5
tests/smoke/smoke.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
test: python3 test.py
|
||||
framework: shell
|
||||
require:
|
||||
- python3
|
||||
- python3-urllib3
|
||||
9
tests/smoke/test.py
Normal file
9
tests/smoke/test.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import urllib3
|
||||
|
||||
http = urllib3.PoolManager()
|
||||
r = http.request('GET', 'http://example.com/')
|
||||
print('status = {0}'.format(r.status))
|
||||
print("headers['server'] = {0}".format(r.headers['server']))
|
||||
print(r.data)
|
||||
if r.status != 200 or not r.data:
|
||||
raise SystemExit(1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue