mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
* added linux and macOS binary. Created linux test * add tor binaries for osx * packaging of tor and now also win-binaries * fix windows script * Bugfix: Do not use cache for sync status and keep compatibility * update Spectrum and don't use cache when spinning * remove torbrowser directory entirely * fix "node is not defined" --------- Co-authored-by: moneymanolis <moneymanolis@protonmail.com> Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>
26 lines
953 B
Python
26 lines
953 B
Python
from cryptoadvance.specter.util.tor_setup_tasks import setup_tor_thread
|
|
import mock
|
|
import logging
|
|
import os
|
|
import subprocess
|
|
|
|
|
|
def test_tor_setup_task(caplog, empty_data_folder):
|
|
"""This test should work with Linux and MacOS. But it's only tested on
|
|
CICD with Linux
|
|
"""
|
|
caplog.set_level(logging.DEBUG)
|
|
spectrum_mock = mock.MagicMock()
|
|
spectrum_mock.data_folder = empty_data_folder
|
|
setup_tor_thread(spectrum_mock)
|
|
print("Files in empty_data_folder")
|
|
for filename in os.listdir(empty_data_folder):
|
|
print(filename)
|
|
print("Files in empty_data_folder/tor-binaries")
|
|
for filename in os.listdir(os.path.join(empty_data_folder, "tor-binaries")):
|
|
print(filename)
|
|
tor_binary = os.path.join(empty_data_folder, "tor-binaries", "tor")
|
|
assert os.path.isfile(tor_binary)
|
|
output = subprocess.check_output([tor_binary, "--version"])
|
|
assert b"Tor version 0.4.8.0" in output
|
|
# assert False
|