summaryrefslogtreecommitdiff
path: root/upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-betamax/run-ptest
blob: 0acad79f97e2f0fe2c47025fc508fdf875178e80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh



if ! nslookup httpbin.org >/dev/null 2>&1 ; then
    trap 'mv /etc/resolv.conf.bak /etc/resolv.conf' INT EXIT
    mv /etc/resolv.conf /etc/resolv.conf.bak    
    echo "nameserver 8.8.8.8" > /etc/resolv.conf
fi

# tests/integration/test_hooks.py records live https://httpbin.org requests
# (no cassettes are shipped for it) and fails whenever the service resets
# the connection, so leave it out.
pytest --automake --ignore=tests/integration/test_hooks.py