コード例 #1
0
ファイル: test_oom_logger.py プロジェクト: white105/paasta
def test_log_to_scribe(log_line):
    logger = Mock()
    log_to_scribe(logger, log_line)
    logger.log_line.assert_called_once_with(
        'tmp_paasta_oom_events',
        json.dumps({
            'timestamp': log_line.timestamp,
            'hostname': log_line.hostname,
            'container_id': log_line.container_id,
            'cluster': log_line.cluster,
            'service': log_line.service,
            'instance': log_line.instance,
            'process_name': log_line.process_name,
        }),
    )
コード例 #2
0
ファイル: test_oom_logger.py プロジェクト: sofyat/paasta
def test_log_to_scribe(log_line):
    logger = Mock()
    log_to_scribe(logger, log_line)
    logger.log_line.assert_called_once_with(
        "tmp_paasta_oom_events",
        json.dumps({
            "timestamp": log_line.timestamp,
            "hostname": log_line.hostname,
            "container_id": log_line.container_id,
            "cluster": log_line.cluster,
            "service": log_line.service,
            "instance": log_line.instance,
            "process_name": log_line.process_name,
        }),
    )