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']
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
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
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