def test_metrics_agents_ping(dcos_api_session):
 for agent in dcos_api_session.slaves:
  response = dcos_api_session.metrics.get('ping', node=agent)
  assert (response.status_code == 200), 'Status code: {}, Content {}'.format(response.status_code, response.content)
  assert response.json()['ok'], 'Status code: {}, Content {}'.format(response.status_code, response.content)
  'agent.'
 for agent in dcos_api_session.public_slaves:
  response = dcos_api_session.metrics.get('ping', node=agent)
  assert (response.status_code == 200), 'Status code: {}, Content {}'.format(response.status_code, response.content)
  assert response.json()['ok'], 'Status code: {}, Content {}'.format(response.status_code, response.content)

def test_metrics_agents_ping ( dcos_api_session ) : for agent in dcos_api_session . slaves : response = dcos_api_session . metrics . get ( 'ping' , node = agent ) assert ( response . status_code == 200 ) , 'Status code: {}, Content {}' . format ( response . status_code , response . content ) assert response . json ( ) [ 'ok' ] , 'Status code: {}, Content {}' . format ( response . status_code , response . content ) for agent in dcos_api_session . public_slaves : response = dcos_api_session . metrics . get ( 'ping' , node = agent ) assert ( response . status_code == 200 ) , 'Status code: {}, Content {}' . format ( response . status_code , response . content ) assert response . json ( ) [ 'ok' ] , 'Status code: {}, Content {}' . format ( response . status_code , response . content )
test that the metrics service is up on masters .