@pytest.mark.skipif((not lb_enabled()), reason='Load Balancer disabled')
def test_if_minuteman_routes_to_vip(dcos_api_session):
 (origin_app, origin_uuid) = get_test_app()
 origin_app['portDefinitions'][0]['labels'] = {'VIP_0': '1.2.3.4:5000'}
 with dcos_api_session.marathon.deploy_and_cleanup(origin_app):
  (proxy_app, proxy_uuid) = get_test_app()
  with dcos_api_session.marathon.deploy_and_cleanup(proxy_app) as service_points:
   cmd = '/opt/mesosphere/bin/curl -s -f -m 5 http://1.2.3.4:5000/ping'
   ensure_routable(cmd, service_points)()

@ pytest . mark . skipif ( ( not lb_enabled ( ) ) , reason = 'Load Balancer disabled' ) def test_if_minuteman_routes_to_vip ( dcos_api_session ) : ( origin_app , origin_uuid ) = get_test_app ( ) origin_app [ 'portDefinitions' ] [ 0 ] [ 'labels' ] = { 'VIP_0' : '1.2.3.4:5000' } with dcos_api_session . marathon . deploy_and_cleanup ( origin_app ) : ( proxy_app , proxy_uuid ) = get_test_app ( ) with dcos_api_session . marathon . deploy_and_cleanup ( proxy_app ) as service_points : cmd = '/opt/mesosphere/bin/curl -s -f -m 5 http://1.2.3.4:5000/ping' ensure_routable ( cmd , service_points ) ( )
test if we are able to connect to a task with a vip using minuteman .