terratest icon indicating copy to clipboard operation
terratest copied to clipboard

feat(packer): support for template directories

Open NefixEstrada opened this issue 11 months ago • 9 comments

Description

Fixes #1271

With this PR you can use directories for Packer templates

Release Notes (draft)

Added support for Packer template directories

NefixEstrada avatar Sep 04 '23 10:09 NefixEstrada

Hello, Adding tests would ensure the ongoing functionality of these changes. Please consider including them. Thank you! 👍

denis256 avatar Sep 04 '23 17:09 denis256

I'm not really sure how to add the tests, since this function calls the actual packer binary

NefixEstrada avatar Sep 08 '23 15:09 NefixEstrada

Hi, can be added example for packer and respective tests

References:

https://github.com/gruntwork-io/terratest/blob/master/test/terraform_packer_example_test.go

https://github.com/gruntwork-io/terratest/tree/master/examples/packer-docker-example

denis256 avatar Sep 13 '23 14:09 denis256

is this still ongoing? we need this because our packer template use multiple files

walbertus avatar Jan 30 '24 06:01 walbertus

We use this in production and works, however I didn't come around to write the tests

NefixEstrada avatar Jan 30 '24 08:01 NefixEstrada

@NefixEstrada do you mind if I take a look and try to create the test?

walbertus avatar Jan 30 '24 08:01 walbertus

@walbertus

Sure, go ahead!

Thanks, Néfix

NefixEstrada avatar Jan 30 '24 10:01 NefixEstrada

Hello @denis256 , @walbertus has implemented the required tests. Could you take a look again at the MR?

Thank you, Néfix

NefixEstrada avatar Jan 31 '24 11:01 NefixEstrada

any input @denis256 ? I'm thinking of adding a mock here to check the binary call but can't find a way to do it. Do you have test recommendations in mind?

walbertus avatar Feb 05 '24 14:02 walbertus