def test_create_extension_template(): create_config_file(config=TEST_CONFIG) create_extension_template('jelly', 'Test extension') assert read_config_file('loadlamb.yaml') == { 'name': 'flask', 'repo': 'loadlamb', 'tasks': [{ 'method_type': 'GET', 'path': '/get' }, { 'method_type': 'POST', 'path': '/post' }, { 'method_type': 'GET', 'path': '/bad-get' }], 'url': 'http://flask:5000', 'user_batch_size': 10, 'user_batch_sleep': 2, 'user_num': 10, 'extensions': ['jelly'] } shutil.rmtree('jelly')
def deploy(filename='loadlamb.yaml', profile_name='default'): c = read_config_file(filename) d = Deploy(c, profile_name=profile_name) d.publish()
def test_create_read_config(): create_config_file(config=TEST_CONFIG) assert os.path.isfile('loadlamb.yaml') assert read_config_file('loadlamb.yaml') == TEST_CONFIG os.remove('loadlamb.yaml')
def create_package(): c = read_config_file() d = Deploy(c) d.create_package() d.remove_venv()