We are trying to run tests on resource aws_lambda but are unable to, the verify command fails with error.
Steps to Reproduce:
Write the following code in lambda_spec.rb:
control 'lambda' do
describe aws_lambdas('tdd-terraform-lambda') do
it { should exist}
its ('handler') { should eq 'lambda'}
# its ('version') { should eq '$LATEST' }
its ('runtime') { should eq 'go1.x' }
end
end
Version:
Test Kitchen version 2.10.0
Environment:
Ubuntu 20.04 Terraform 13.5 ruby 2.7.1
Using Kitchen-terraform to test aws infra
Scenario:
We are trying to run tests on resource
aws_lambda
but are unable to, the verify command fails with error.Steps to Reproduce:
Write the following code in
lambda_spec.rb
:Tree:
kitchen.yml
:AWS Credentials exported in the ENV
run command
kitchen converge
to create aws resources >> this Passesrun command
kitchen verify
to run tests >> this FailsExpected Result:
Run test and return result if Lambda function is present (or not)
Actual Result: