Hi, are there any further examples of writing test...
# golang
g
Hi, are there any further examples of writing tests in golang? I’ve been looking at the examples repo, and was hoping to see some other examples besides the unit tests already included… I looked at the aws provider as well but didn’t see any there either
w
Anything in particular you are looking for an example of? For unit tests https://github.com/pulumi/pulumi/issues/838 covers most of the core scenarios. For integration tests, there is an internal test framework used in many Pulumi projects that can also be used by any other Pulumi projects. You can see examples of using that here: https://github.com/pulumi/examples/blob/master/misc/test/examples_test.go. If there are any questions you have on things not covered in those - let us know so we can add or expand examples to cover those topics.
g
It took me a couple unit test runs to realize the error I was introducing would occur after the planning stage and I didn’t think to look in the ‘misc’ folder. This is awesome and exactly what I was looking for. Thank you, Luke. Will do re: Further topics / questions, thanks again!
👍 1