def test_config_with_secrets(): server.SECRETS_FILE = 'test-config-secrets.yaml' server.CONFIG_FILE = 'test-config.yaml' _dir = os.path.dirname(os.path.abspath(__file__)) conf = server._configure(_dir) assert conf assert conf['logging']['level'] == 'DEBUG' assert conf['sources']['front_door_camera']['uri'] == 'secret_uri'
def test_config_without_secrets_no_ref(): server.SECRETS_FILE = '__no__secrets__.lmay__' server.CONFIG_FILE = 'test-config2.yaml' _dir = os.path.dirname(os.path.abspath(__file__)) conf = server._configure(_dir) assert conf assert conf['logging']['level'] == 'DEBUG' assert conf['sources']['front_door_camera']['uri'] == 'no_secret_uri'
def test_config_without_secrets_failed_ref(): server.SECRETS_FILE = '__no__secrets__.lmay__' server.CONFIG_FILE = 'test-config.yaml' _dir = os.path.dirname(os.path.abspath(__file__)) conf = server._configure(_dir) assert not conf
def test_no_pipelines(): server.CONFIG_FILE = 'test-config-no-pipelines.yaml' _dir = os.path.dirname(os.path.abspath(__file__)) conf = server._configure(_dir) assert not conf
def test_no_config(): conf = server._configure('/') assert not conf