#2784 Adding missing support for EbsConfiguration on EMR run_job_flow
This commit is contained in:
parent
9024031ca2
commit
a9b0677667
@ -35,6 +35,7 @@ class FakeInstanceGroup(BaseModel):
|
||||
name=None,
|
||||
id=None,
|
||||
bid_price=None,
|
||||
ebs_configuration=None,
|
||||
):
|
||||
self.id = id or random_instance_group_id()
|
||||
|
||||
@ -51,6 +52,7 @@ class FakeInstanceGroup(BaseModel):
|
||||
self.num_instances = instance_count
|
||||
self.role = instance_role
|
||||
self.type = instance_type
|
||||
self.ebs_configuration = ebs_configuration
|
||||
|
||||
self.creation_datetime = datetime.now(pytz.utc)
|
||||
self.start_datetime = datetime.now(pytz.utc)
|
||||
|
@ -61,6 +61,23 @@ input_instance_groups = [
|
||||
"Name": "task-2",
|
||||
"BidPrice": "0.05",
|
||||
},
|
||||
{
|
||||
"InstanceCount": 10,
|
||||
"InstanceRole": "TASK",
|
||||
"InstanceType": "c1.xlarge",
|
||||
"Market": "SPOT",
|
||||
"Name": "task-3",
|
||||
"BidPrice": "0.05",
|
||||
"EbsConfiguration": {
|
||||
"EbsBlockDeviceConfigs": [
|
||||
{
|
||||
"VolumeSpecification": {"VolumeType": "gp2", "SizeInGB": 800},
|
||||
"VolumesPerInstance": 6,
|
||||
},
|
||||
],
|
||||
"EbsOptimized": True,
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@ -447,6 +464,8 @@ def test_run_job_flow_with_instance_groups():
|
||||
x["Market"].should.equal(y["Market"])
|
||||
if "BidPrice" in y:
|
||||
x["BidPrice"].should.equal(y["BidPrice"])
|
||||
if "EbsConfiguration" in y:
|
||||
x["EbsConfiguration"].should.equal(y["EbsConfiguration"])
|
||||
|
||||
|
||||
@mock_emr
|
||||
@ -604,6 +623,8 @@ def test_instance_groups():
|
||||
y = input_groups[x["Name"]]
|
||||
if hasattr(y, "BidPrice"):
|
||||
x["BidPrice"].should.equal("BidPrice")
|
||||
if "EbsConfiguration" in y:
|
||||
x["EbsConfiguration"].should.equal(y["EbsConfiguration"])
|
||||
x["CreationDateTime"].should.be.a("datetime.datetime")
|
||||
# x['EndDateTime'].should.be.a('datetime.datetime')
|
||||
x.should.have.key("InstanceGroupId")
|
||||
@ -623,6 +644,8 @@ def test_instance_groups():
|
||||
y = input_groups[x["Name"]]
|
||||
if hasattr(y, "BidPrice"):
|
||||
x["BidPrice"].should.equal("BidPrice")
|
||||
if "EbsConfiguration" in y:
|
||||
x["EbsConfiguration"].should.equal(y["EbsConfiguration"])
|
||||
# Configurations
|
||||
# EbsBlockDevices
|
||||
# EbsOptimized
|
||||
|
Loading…
Reference in New Issue
Block a user