def test_octarine_http(dcos_api_session, timeout=30):
 test_uuid = uuid.uuid4().hex
 octarine_id = uuid.uuid4().hex
 proxy = ('"http://127.0.0.1:$(/opt/mesosphere/bin/octarine ' + '--client --port {})"'.format(octarine_id))
 check_command = 'curl --fail --proxy {} marathon.mesos.mydcos.directory'.format(proxy)
 app_definition = {'id': '/integration-test-app-octarine-http-{}'.format(test_uuid), 'cpus': 0.1, 'mem': 128, 'ports': [0], 'cmd': '/opt/mesosphere/bin/octarine {}'.format(octarine_id), 'disk': 0, 'instances': 1, 'healthChecks': [{'protocol': 'COMMAND', 'command': {'value': check_command}, 'gracePeriodSeconds': 5, 'intervalSeconds': 10, 'timeoutSeconds': 10, 'maxConsecutiveFailures': 3}]}
 dcos_api_session.marathon.deploy_and_cleanup(app_definition)

def test_octarine_http ( dcos_api_session , timeout = 30 ) : test_uuid = uuid . uuid4 ( ) . hex octarine_id = uuid . uuid4 ( ) . hex proxy = ( '"http://127.0.0.1:$(/opt/mesosphere/bin/octarine ' + '--client --port {})"' . format ( octarine_id ) ) check_command = 'curl --fail --proxy {} marathon.mesos.mydcos.directory' . format ( proxy ) app_definition = { 'id' : '/integration-test-app-octarine-http-{}' . format ( test_uuid ) , 'cpus' : 0.1 , 'mem' : 128 , 'ports' : [ 0 ] , 'cmd' : '/opt/mesosphere/bin/octarine {}' . format ( octarine_id ) , 'disk' : 0 , 'instances' : 1 , 'healthChecks' : [ { 'protocol' : 'COMMAND' , 'command' : { 'value' : check_command } , 'gracePeriodSeconds' : 5 , 'intervalSeconds' : 10 , 'timeoutSeconds' : 10 , 'maxConsecutiveFailures' : 3 } ] } dcos_api_session . marathon . deploy_and_cleanup ( app_definition )
test if we are able to send traffic through octarine .