コード例 #1
0
ファイル: test_ecs.py プロジェクト: yellowierd0/ecs-deploy
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
ファイル: test_ecs.py プロジェクト: yellowierd0/ecs-deploy
def service_without_deployments():
    return EcsService(CLUSTER_NAME,
                      deepcopy(PAYLOAD_SERVICE_WITHOUT_DEPLOYMENTS))
コード例 #3
0
ファイル: test_ecs.py プロジェクト: yellowierd0/ecs-deploy
def service():
    return EcsService(CLUSTER_NAME, deepcopy(PAYLOAD_SERVICE))
コード例 #4
0
ファイル: test_ecs.py プロジェクト: yellowierd0/ecs-deploy
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))