Fix integration tests

This commit is contained in:
kpcyrd 2021-06-23 17:33:09 +02:00
parent d0a36be95a
commit 5409ed8cdb
1 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,8 @@
#!/usr/bin/env python3
import subprocess
from subprocess import DEVNULL, PIPE
import shutil
from pathlib import Path
import tempfile
import json
import sys
@ -98,6 +100,11 @@ def main(tempdir, binary):
('https://www.example.com/', 200),
}
cache = Path.home() / '.cache' / 'sn0int'
if cache.exists():
print('[*] copying geoip files')
shutil.copytree(cache, tempdir + '/.cache/sn0int', dirs_exist_ok=True)
print('[*] running geoip')
sn0int(tempdir, binary, [
'use geoip',