remove defunct test, add random bint ip test, and fix offline mode
parent
ef25377e15
commit
a1fd5f2648
|
@ -84,13 +84,14 @@ def daemon():
|
|||
shared_state.share_object() # share the parent object to the threads
|
||||
|
||||
apiHost = ''
|
||||
while apiHost == '':
|
||||
try:
|
||||
with open(filepaths.public_API_host_file, 'r') as hostFile:
|
||||
apiHost = hostFile.read()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
time.sleep(0.5)
|
||||
if not offline_mode:
|
||||
while apiHost == '':
|
||||
try:
|
||||
with open(filepaths.public_API_host_file, 'r') as hostFile:
|
||||
apiHost = hostFile.read()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
time.sleep(0.5)
|
||||
|
||||
logger.raw('', terminal=True)
|
||||
# print nice header thing :)
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
import sys, os
|
||||
sys.path.append(".")
|
||||
sys.path.append("src/")
|
||||
import unittest, uuid, json
|
||||
TEST_DIR = 'testdata/%s-%s' % (uuid.uuid4(), os.path.basename(__file__)) + '/'
|
||||
print("Test directory:", TEST_DIR)
|
||||
os.environ["ONIONR_HOME"] = TEST_DIR
|
||||
import onionrblocks
|
||||
from utils import createdirs
|
||||
from utils import readstatic
|
||||
createdirs.create_dirs()
|
||||
class OnionrConfigTest(unittest.TestCase):
|
||||
def test_security_value(self):
|
||||
return
|
||||
|
||||
unittest.main()
|
|
@ -0,0 +1,16 @@
|
|||
import sys, os
|
||||
sys.path.append(".")
|
||||
sys.path.append("src/")
|
||||
import unittest, uuid
|
||||
TEST_DIR = 'testdata/%s-%s' % (uuid.uuid4(), os.path.basename(__file__)) + '/'
|
||||
print("Test directory:", TEST_DIR)
|
||||
os.environ["ONIONR_HOME"] = TEST_DIR
|
||||
from onionrsetup import setup_config
|
||||
setup_config()
|
||||
import config
|
||||
|
||||
class TestRandomBindIP(unittest.TestCase):
|
||||
def test_random_bind_ip_default_setting(self):
|
||||
self.assertTrue(config.get('general.random_bind_ip'))
|
||||
|
||||
unittest.main()
|
Loading…
Reference in New Issue