Open remyleone opened 6 years ago
to specify: for acceptance tests
This is a very good idea. @meyskens and myself were discussing a couple of days ago how our acceptance tests were very much linked to our own details. This would make things easy if you want to test in other environments.
There's one thing that I don't understand. As far as I understand the proposal in the blog, we would store in the fixtures data about the resources: ids, rpnv2 names, ips, macs and so on, but we would not store any credential as those should be set in the provider or using the ONLINE_TOKEN
env variable
You can have a credentials.example.yml
that is a template with credentials blocks and comments that explain how to get started. Then users copy this to a file named credentials.yml
that contain the actual credentials and that is read when the tests are launched.
Feel free to add a pre-flight check to ensure that the file exists and are correctly filled up.
The idea looks great. The only thing that I wouldn't do is to call that fixture credentials.yaml
as it is misleading: it won't contain any credentials.
Could you have a test fixtures https://dave.cheney.net/2016/05/10/test-fixtures-in-go that contain credentials to a specific set of resources?
I would like to test this provider easily with an internal account that got many resources.