try to fix storagecounter test in CI

master
Kevin Froman 2019-09-10 21:53:28 -05:00
parent 5e86864298
commit fd6660aba1
3 changed files with 4 additions and 3 deletions

View File

@ -3,5 +3,5 @@ test:
script: script:
- apt-get update -qy - apt-get update -qy
- apt-get install -y python3-pip tor - apt-get install -y python3-pip tor
- pip3 install -r requirements.txt - pip3 install --require-hashes -r requirements.txt
- make test - make test

View File

@ -23,7 +23,6 @@ from etc import onionrvalues
from logger.settings import * from logger.settings import *
def setup_config(): def setup_config():
config.reload()
if not os.path.exists(config._configfile): if not os.path.exists(config._configfile):
if os.path.exists('static-data/default_config.json'): if os.path.exists('static-data/default_config.json'):
@ -33,6 +32,8 @@ def setup_config():
config.save() config.save()
config.reload()
settings = 0b000 settings = 0b000
if config.get('log.console.color', True): if config.get('log.console.color', True):
settings = settings | USE_ANSI settings = settings | USE_ANSI

View File

@ -26,7 +26,7 @@ class TestStorageCounter(unittest.TestCase):
import config import config
_test_setup() _test_setup()
self.assertIsNotNone(config.get('allocations.disk')) self.assertIsNotNone(config.get('allocations.disk'))
self.assertGreater(config.get('allocations.disk'), 1000000) self.assertGreaterEqual(config.get('allocations.disk'), 1000000)
def test_insert_too_much(self): def test_insert_too_much(self):
import config import config