vals icon indicating copy to clipboard operation
vals copied to clipboard

question: vault/ssm/awssecrets testing approach

Open klebediev opened this issue 6 years ago • 4 comments

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?

klebediev avatar Oct 17 '19 17:10 klebediev

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.

mumoshu avatar Oct 17 '19 18:10 mumoshu

Thanks @mumoshu !

klebediev avatar Oct 17 '19 18:10 klebediev

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

klebediev avatar Oct 18 '19 07:10 klebediev

Oh! I knew localstack but had never realized it supported SSM as well. Thanks a lot for your info!

mumoshu avatar Oct 20 '19 23:10 mumoshu