Пример #1
0
def test_ecs_server_get_warnings():
    since = datetime.now() - timedelta(hours=1)
    until = datetime.now() + timedelta(hours=1)

    event_unable = {
        u'createdAt': datetime.now(),
        u'message': u'unable to foo',
    }

    event_unknown = {
        u'createdAt': datetime.now(),
        u'message': u'unkown foo',
    }

    service = EcsService('foo', {
        u'deployments': [],
        u'events': [event_unable, event_unknown],
    })

    assert len(service.get_warnings(since, until)) == 1
Пример #2
0
def service_without_deployments():
    return EcsService(CLUSTER_NAME,
                      deepcopy(PAYLOAD_SERVICE_WITHOUT_DEPLOYMENTS))
Пример #3
0
def service():
    return EcsService(CLUSTER_NAME, deepcopy(PAYLOAD_SERVICE))
Пример #4
0
def service_with_errors():
    return EcsService(CLUSTER_NAME, deepcopy(PAYLOAD_SERVICE_WITH_ERRORS))
Пример #5
0
def service_with_strategy():
    return EcsService(CLUSTER_NAME, deepcopy(PAYLOAD_SERVICE_WITH_STRATEGY))