Example #1
0
def test_scale_app(prepare_demo_images, add_node):
    app_ctl.delete(APPNAME)
    app_ctl.reposit(APPNAME)
    app_ctl.deploy(APPNAME)
    assert app_ctl.is_working(APPNAME) == True

    req = app_ctl.scale(APPNAME, PROCNAME, NUM_INSTANCES)
    assert req.status_code == 202
    assert app_ctl.is_scaled(APPNAME, PROCNAME, NUM_INSTANCES) == True

    for i in range(NUM_INSTANCES):
        req = app_ctl.get_service(APPNAME)
        assert req.status_code == 200
        assert req.text == 'Hello, "/"'

    app_ctl.delete(APPNAME)
Example #2
0
def test_scale_app(prepare_demo_images, add_node):
    app_ctl.delete(APPNAME)
    app_ctl.reposit(APPNAME)
    app_ctl.deploy(APPNAME)
    assert app_ctl.is_working(APPNAME) == True

    req = app_ctl.scale(APPNAME, PROCNAME, NUM_INSTANCES)
    assert req.status_code == 202
    assert app_ctl.is_scaled(APPNAME, PROCNAME, NUM_INSTANCES) == True

    for i in range(NUM_INSTANCES):
        req = app_ctl.get_service(APPNAME)
        assert req.status_code == 200
        assert req.text == 'Hello, "/"'

    app_ctl.delete(APPNAME)
Example #3
0
def test_deploy_hello(prepare_demo_images):
    app_ctl.delete(APPNAME)
    app_ctl.reposit(APPNAME)
    req = app_ctl.deploy(APPNAME)
    # print(req.text)
    assert req.status_code == 201
    content = json.loads(req.text)
    assert "OK: True" in content['msg']

    assert app_ctl.is_working(APPNAME) == True
    req = app_ctl.get_service(APPNAME)
    assert req.status_code == 200
    assert req.text == 'Hello, "/"'
    # print(content['msg'])

    req = app_ctl.delete(APPNAME)
    assert req.status_code == 202
Example #4
0
def test_deploy_hello(prepare_demo_images):
    app_ctl.delete(APPNAME)
    app_ctl.reposit(APPNAME)
    req = app_ctl.deploy(APPNAME)
    # print(req.text)
    assert req.status_code == 201
    content = json.loads(req.text)
    assert "OK: True" in content['msg']

    assert app_ctl.is_working(APPNAME) == True
    req = app_ctl.get_service(APPNAME)
    assert req.status_code == 200
    assert req.text == 'Hello, "/"'
    # print(content['msg'])

    req = app_ctl.delete(APPNAME)
    assert req.status_code == 202
Example #5
0
def deploy_ipaddr(reposit_ipaddr):
    app_ctl.deploy(CONFIG.ipaddr_resource_appname)
    app_ctl.deploy(CONFIG.ipaddr_service_appname)
    time.sleep(60)
    app_ctl.deploy(CONFIG.ipaddr_client_appname)
    time.sleep(30)
Example #6
0
def deploy_ipaddr(reposit_ipaddr):
    app_ctl.deploy(CONFIG.ipaddr_resource_appname)
    app_ctl.deploy(CONFIG.ipaddr_service_appname)
    time.sleep(60)
    app_ctl.deploy(CONFIG.ipaddr_client_appname)
    time.sleep(30)