D-173-250-189-251:cloudknot (elminiate-circular-import) $make test
py.test --pyargs cloudknot --cov-report term-missing --cov=cloudknot
Test session starts (platform: darwin, Python 3.5.2, pytest 3.0.6, pytest-sugar 0.8.0)
rootdir: /Users/arokem/source/cloudknot, inifile:
plugins: sugar-0.8.0, django-3.1.2, cov-2.4.0, flaky-3.3.0
――――――――――――― ERROR at setup of test_wait_for_compute_environment ――――――――――――――
@pytest.fixture(scope='module')
def pars():
> p = ck.Pars(name='unit-test')
cloudknot/tests/test_aws.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cloudknot/cloudknot.py:232: in __init__
self._vpc = aws.ec2.Vpc(name=vpc_name)
cloudknot/aws/ec2.py:96: in __init__
self._vpc_id = self._create()
cloudknot/aws/ec2.py:243: in _create
'Value': self.name
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:253: in _api_call
return self._make_api_call(operation_name, kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.EC2 object at 0x106fbf588>
operation_name = 'CreateTags'
api_params = {'Resources': ['vpc-7a9f7102'], 'Tags': [{'Key': 'owner', 'Value': 'cloudknot'}, {'Key': 'Name', 'Value': 'unit-test-cloudknot-vpc'}]}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
handler, event_response = self.meta.events.emit_until_response(
'before-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._endpoint.make_request(
operation_model, request_dict)
self.meta.events.emit(
'after-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InvalidVpcID.NotFound) when calling the CreateTags operation: The vpc ID 'vpc-7a9f7102' does not exist
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:557: ClientError
8% ▉
―――――――――――――――――― ERROR at setup of test_wait_for_job_queue ―――――――――――――――――――
@pytest.fixture(scope='module')
def pars():
> p = ck.Pars(name='unit-test')
cloudknot/tests/test_aws.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cloudknot/cloudknot.py:232: in __init__
self._vpc = aws.ec2.Vpc(name=vpc_name)
cloudknot/aws/ec2.py:96: in __init__
self._vpc_id = self._create()
cloudknot/aws/ec2.py:243: in _create
'Value': self.name
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:253: in _api_call
return self._make_api_call(operation_name, kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.EC2 object at 0x106fbf588>
operation_name = 'CreateTags'
api_params = {'Resources': ['vpc-7a9f7102'], 'Tags': [{'Key': 'owner', 'Value': 'cloudknot'}, {'Key': 'Name', 'Value': 'unit-test-cloudknot-vpc'}]}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
handler, event_response = self.meta.events.emit_until_response(
'before-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._endpoint.make_request(
operation_model, request_dict)
self.meta.events.emit(
'after-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InvalidVpcID.NotFound) when calling the CreateTags operation: The vpc ID 'vpc-7a9f7102' does not exist
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:557: ClientError
17% █▋
cloudknot/tests/test_aws.py ✓✓ 33% ███▍
cloudknot/tests/test_aws.py ✓✓✓✓ 50% █████
――――――――――――――――――――― ERROR at setup of test_JobDefinition ―――――――――――――――――――――
@pytest.fixture(scope='module')
def pars():
> p = ck.Pars(name='unit-test')
cloudknot/tests/test_aws.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cloudknot/cloudknot.py:232: in __init__
self._vpc = aws.ec2.Vpc(name=vpc_name)
cloudknot/aws/ec2.py:96: in __init__
self._vpc_id = self._create()
cloudknot/aws/ec2.py:243: in _create
'Value': self.name
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:253: in _api_call
return self._make_api_call(operation_name, kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.EC2 object at 0x106fbf588>
operation_name = 'CreateTags'
api_params = {'Resources': ['vpc-7a9f7102'], 'Tags': [{'Key': 'owner', 'Value': 'cloudknot'}, {'Key': 'Name', 'Value': 'unit-test-cloudknot-vpc'}]}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
handler, event_response = self.meta.events.emit_until_response(
'before-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._endpoint.make_request(
operation_model, request_dict)
self.meta.events.emit(
'after-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InvalidVpcID.NotFound) when calling the CreateTags operation: The vpc ID 'vpc-7a9f7102' does not exist
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:557: ClientError
cloudknot/tests/test_aws.py ✓✓✓✓ 58% █████▉
―――――――――――――――――― ERROR at setup of test_ComputeEnvironment ―――――――――――――――――――
@pytest.fixture(scope='module')
def pars():
> p = ck.Pars(name='unit-test')
cloudknot/tests/test_aws.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cloudknot/cloudknot.py:232: in __init__
self._vpc = aws.ec2.Vpc(name=vpc_name)
cloudknot/aws/ec2.py:96: in __init__
self._vpc_id = self._create()
cloudknot/aws/ec2.py:243: in _create
'Value': self.name
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:253: in _api_call
return self._make_api_call(operation_name, kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.EC2 object at 0x106fbf588>
operation_name = 'CreateTags'
api_params = {'Resources': ['vpc-7a9f7102'], 'Tags': [{'Key': 'owner', 'Value': 'cloudknot'}, {'Key': 'Name', 'Value': 'unit-test-cloudknot-vpc'}]}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
handler, event_response = self.meta.events.emit_until_response(
'before-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._endpoint.make_request(
operation_model, request_dict)
self.meta.events.emit(
'after-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InvalidVpcID.NotFound) when calling the CreateTags operation: The vpc ID 'vpc-7a9f7102' does not exist
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:557: ClientError
cloudknot/tests/test_aws.py ✓✓✓✓ 67% ██████▋
――――――――――――――――――――――― ERROR at setup of test_JobQueue ――――――――――――――――――――――――
@pytest.fixture(scope='module')
def pars():
> p = ck.Pars(name='unit-test')
cloudknot/tests/test_aws.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cloudknot/cloudknot.py:232: in __init__
self._vpc = aws.ec2.Vpc(name=vpc_name)
cloudknot/aws/ec2.py:96: in __init__
self._vpc_id = self._create()
cloudknot/aws/ec2.py:243: in _create
'Value': self.name
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:253: in _api_call
return self._make_api_call(operation_name, kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.EC2 object at 0x106fbf588>
operation_name = 'CreateTags'
api_params = {'Resources': ['vpc-7a9f7102'], 'Tags': [{'Key': 'owner', 'Value': 'cloudknot'}, {'Key': 'Name', 'Value': 'unit-test-cloudknot-vpc'}]}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
handler, event_response = self.meta.events.emit_until_response(
'before-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._endpoint.make_request(
operation_model, request_dict)
self.meta.events.emit(
'after-call.{endpoint_prefix}.{operation_name}'.format(
endpoint_prefix=self._service_model.endpoint_prefix,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InvalidVpcID.NotFound) when calling the CreateTags operation: The vpc ID 'vpc-7a9f7102' does not exist
../../anaconda3/lib/python3.5/site-packages/botocore/client.py:557: ClientError
cloudknot/tests/test_aws.py ✓✓✓✓✓✓ 92% █████████▎
cloudknot/tests/test_cloudknot.py ✓ 100% ██████████
---------- coverage: platform darwin, python 3.5.2-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
-------------------------------------------------------------------------------
cloudknot/__init__.py 5 0 0 0 100%
cloudknot/aws/__init__.py 6 0 0 0 100%
cloudknot/aws/base_classes.py 71 24 14 1 56% 108, 112, 121-141, 148-164, 105->108
cloudknot/aws/batch.py 467 398 170 0 11% 61-151, 173-210, 220-248, 257-264, 345-589, 635-717, 727-766, 776-833, 859-943, 969-1002, 1012-1029, 1033-1046, 1056-1080, 1120-1178, 1207-1234, 1244-1266, 1279-1285, 1299-1304
cloudknot/aws/ec2.py 212 14 64 3 92% 18-20, 267-269, 583, 587, 592, 611, 616-622, 586->587, 591->592, 610->611
cloudknot/aws/ecr.py 82 61 33 0 18% 43-72, 83-104, 108-145, 149, 155-162, 174-184, 193
cloudknot/aws/iam.py 125 0 49 0 100%
cloudknot/cloudknot.py 216 153 66 8 25% 26-30, 36-42, 48-51, 60, 67-68, 73-74, 83-158, 162-163, 179-180, 185-186, 200-201, 206-207, 221-222, 227-229, 234-280, 286-305, 311-334, 355-373, 379-397, 401-411, 420-477, 59->60, 66->67, 72->73, 81->83, 161->162, 184->185, 205->206, 226->227
cloudknot/tests/__init__.py 0 0 0 0 100%
cloudknot/tests/test_aws.py 571 325 46 0 43% 39-40, 53-64, 76-97, 759-938, 989-1373, 1484-1667
cloudknot/tests/test_cloudknot.py 3 0 0 0 100%
-------------------------------------------------------------------------------
TOTAL 1758 975 442 12 42%
===Flaky Test Report===
===End Flaky Test Report===
Results (42.59s):
7 passed
5 error
make: *** [test] Error 1