question: vault/ssm/awssecrets testing approach
Hi!
There are TODO sections like this one: prerequisites for unit-tests to run successfully (some operations are needed to be run manually from console).
Wondering what's the best way to fully automate tests.
Should vault[/awssecrets/ssm] just be mocked?
Or (at least in case of vault) we may start test vault cluster for example in TestMain() and populate it with test data?
Hey! Yeah, generally mocking sounds great, especially or awssecrets and ssm.
If mocking turned too difficult, for Vault, adding a makefile target or a CI step to run vault dev-server before go test would be ok, as it's easy.
For awssecrets and ssm we don't have reliable implementations of them that run locally.
Thanks @mumoshu !
For awssecrets and ssm we don't have reliable implementations of them that run locally.
just in case, found this https://github.com/localstack/localstack
Oh! I knew localstack but had never realized it supported SSM as well. Thanks a lot for your info!