Add instance_id to spot instance requests. Closes #210.
This commit is contained in:
parent
68097f63d0
commit
b82507e41b
2 changed files with 17 additions and 0 deletions
|
|
@ -180,3 +180,18 @@ def test_get_all_spot_instance_requests_filtering():
|
|||
|
||||
requests = conn.get_all_spot_instance_requests(filters={'tag:tag1' : 'value1', 'tag:tag2' : 'value2'})
|
||||
requests.should.have.length_of(1)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_request_spot_instances_setting_instance_id():
|
||||
conn = boto.connect_ec2()
|
||||
request = conn.request_spot_instances(
|
||||
price=0.5, image_id='ami-abcd1234')
|
||||
|
||||
req = get_model('SpotInstanceRequest')[0]
|
||||
req.state = 'active'
|
||||
req.instance_id = 'i-12345678'
|
||||
|
||||
request = conn.get_all_spot_instance_requests()[0]
|
||||
assert request.state == 'active'
|
||||
assert request.instance_id == 'i-12345678'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue