Use known ImageID in internal tests (#3555)
This commit is contained in:
parent
a2246df1a4
commit
77dd35e3b8
23 changed files with 258 additions and 260 deletions
|
|
@ -5,6 +5,7 @@ import sure # noqa
|
|||
|
||||
from moto import mock_ec2
|
||||
from moto.core import ACCOUNT_ID
|
||||
from tests import EXAMPLE_AMI_ID
|
||||
|
||||
|
||||
def get_subnet_id(conn):
|
||||
|
|
@ -24,7 +25,7 @@ def spot_config(subnet_id, allocation_strategy="lowestPrice"):
|
|||
"IamFleetRole": "arn:aws:iam::{}:role/fleet".format(ACCOUNT_ID),
|
||||
"LaunchSpecifications": [
|
||||
{
|
||||
"ImageId": "ami-123",
|
||||
"ImageId": EXAMPLE_AMI_ID,
|
||||
"KeyName": "my-key",
|
||||
"SecurityGroups": [{"GroupId": "sg-123"}],
|
||||
"UserData": "some user data",
|
||||
|
|
@ -54,7 +55,7 @@ def spot_config(subnet_id, allocation_strategy="lowestPrice"):
|
|||
"SpotPrice": "0.13",
|
||||
},
|
||||
{
|
||||
"ImageId": "ami-123",
|
||||
"ImageId": EXAMPLE_AMI_ID,
|
||||
"KeyName": "my-key",
|
||||
"SecurityGroups": [{"GroupId": "sg-123"}],
|
||||
"UserData": "some user data",
|
||||
|
|
@ -108,7 +109,7 @@ def test_create_spot_fleet_with_lowest_price():
|
|||
launch_spec["IamInstanceProfile"].should.equal(
|
||||
{"Arn": "arn:aws:iam::{}:role/fleet".format(ACCOUNT_ID)}
|
||||
)
|
||||
launch_spec["ImageId"].should.equal("ami-123")
|
||||
launch_spec["ImageId"].should.equal(EXAMPLE_AMI_ID)
|
||||
launch_spec["InstanceType"].should.equal("t2.small")
|
||||
launch_spec["KeyName"].should.equal("my-key")
|
||||
launch_spec["Monitoring"].should.equal({"Enabled": True})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue