adds failing test case for lambda cfm env vars

Adds a failing test case that shows that a Lambda function resource in a CloudFormation template ignores
the Environment variable mapping.
This commit is contained in:
Jacob Grismo 2018-12-28 22:16:07 -05:00
parent 97d9d46770
commit 4f7d6e15c9

View File

@ -1952,7 +1952,12 @@ def lambda_handler(event, context):
"Description": "Test function",
"MemorySize": 128,
"Role": "test-role",
"Runtime": "python2.7"
"Runtime": "python2.7",
"Environment": {
"Variables": {
"TEST_ENV_KEY": "test-env-val",
}
},
}
}
}
@ -1973,6 +1978,9 @@ def lambda_handler(event, context):
result['Functions'][0]['MemorySize'].should.equal(128)
result['Functions'][0]['Role'].should.equal('test-role')
result['Functions'][0]['Runtime'].should.equal('python2.7')
result['Functions'][0]['Environment'].should.equal({
"Variables": {"TEST_ENV_KEY": "test-env-val"}
})
@mock_cloudformation