Fix integration tests

This commit is contained in:
kpcyrd
2021-06-23 17:33:09 +02:00
parent d0a36be95a
commit 5409ed8cdb

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import subprocess import subprocess
from subprocess import DEVNULL, PIPE from subprocess import DEVNULL, PIPE
import shutil
from pathlib import Path
import tempfile import tempfile
import json import json
import sys import sys
@@ -98,6 +100,11 @@ def main(tempdir, binary):
('https://www.example.com/', 200), ('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') print('[*] running geoip')
sn0int(tempdir, binary, [ sn0int(tempdir, binary, [
'use geoip', 'use geoip',