Skip to content

Commit

Permalink
Add dummy test to check retrying spot requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
davebx committed Jul 12, 2014
1 parent 7a5bd13 commit 125b343
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions master/buildbot/test/unit/test_buildslave_ec2.py
Expand Up @@ -139,6 +139,7 @@ def test_start_spot_instance(self):
if i.state != "terminated"]
self.assertTrue(bs.spot_instance)
self.assertEqual(bs.retry, 1)
self.assertEqual(bs.product_description, product_description)
self.assertEqual(len(instances), 1)
self.assertEqual(instances[0].id, instance_id)
self.assertEqual(instances[0].tags, {})
Expand All @@ -164,3 +165,14 @@ def test_start_spot_instance_retry(self):
self.assertEqual(bs.attempt, 1)
self.assertEqual(len(instances), 1)
self.assertEqual(instances[0].id, id)

@mock_ec2
def test_start_spot_instance_retry_low_price(self):
'''
This test should attempt to start an instance that will be rejected with
price-too-low. At this point, the ec2 buildslave code should increment
bs.attempt and multiply the price by bs.retry_price_adjustment. This
should continue for bs.retry iterations or until the spot request is
accepted.
'''
raise unittest.SkipTest("Requires un-released functionality in moto.")

0 comments on commit 125b343

Please sign in to comment.