Closed Guslington closed 4 years ago
Haven't been giving testing of highlander components too much of a thought lately, I think README
covers most of the cases consumer would expect, only idea is to add check for type of the property value. E.g. Lambda timeout property needs be a number.
overall It's great work, making infra code supply chain more mature 👍
@aaronwalker @toshke just started this project on the back of doing some rspec testing on some of the new templates such as vpc-v2 and thought it would be better with some custom rspec matchers.
It currently will compile and validate the test from either a cftest yaml file or pass in custom config directly to Cfhlspec
from yaml
or directly
once initialised the components need to be loaded
then they can be compiled and validated by either performing the tests
or in the before stage
Once compiled the compiled yaml is loaded into an OpenStruct and then the template test can be performed on the struct
My next step is to implement conditions and outputs and then some deeper resource testing.
Some other ideas are to pass in a parameter value and based upon that value test an outcome for example if we had an environment mapping and based upon the environment parameter we could test what the mapping value would be. Even on conditions if the condition is true will it create the resource.
Any thoughts, ideas, comments?