Beispiel #1
0
def test_node_metrics_agent_summary_json():
    first_node_id = _node()[0]['id']

    node_json = fetch_valid_json(
        ['dcos', 'node', 'metrics', 'summary', first_node_id, '--json'])

    names = [d['name'] for d in node_json]
    assert names == ['cpu.total', 'memory.total', 'filesystem.capacity.used']
Beispiel #2
0
def test_node_metrics_agent_details_json():
    first_node_id = _node()[0]['id']

    node_json = fetch_valid_json(
        ['dcos', 'node', 'metrics', 'details', first_node_id, '--json'])

    names = [d['name'] for d in node_json]
    assert 'system.uptime' in names
    assert 'cpu.cores' in names
Beispiel #3
0
 def _fetch_valid_json():
     node_json = fetch_valid_json(
         ['dcos', 'node', 'metrics', 'details', first_node_id, '--json'])
     assert len(node_json) > 100
     return node_json
Beispiel #4
0
 def _fetch_valid_json():
     node_json = fetch_valid_json(
         ['dcos', 'node', 'metrics', 'summary', first_node_id, '--json'])
     assert len(node_json) > 0
     return node_json