remove defunct test, add random bint ip test, and fix offline mode
parent
ef25377e15
commit
a1fd5f2648
|
@ -84,6 +84,7 @@ def daemon():
|
||||||
shared_state.share_object() # share the parent object to the threads
|
shared_state.share_object() # share the parent object to the threads
|
||||||
|
|
||||||
apiHost = ''
|
apiHost = ''
|
||||||
|
if not offline_mode:
|
||||||
while apiHost == '':
|
while apiHost == '':
|
||||||
try:
|
try:
|
||||||
with open(filepaths.public_API_host_file, 'r') as hostFile:
|
with open(filepaths.public_API_host_file, 'r') as hostFile:
|
||||||
|
|
|
@ -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