StackStorm / chef-stackstorm

DEPRECATED! Community-maintained Chef Cookbook to deploy StackStorm, IFTTT for Ops
https://supermarket.chef.io/cookbooks/stackstorm
Apache License 2.0
16 stars 10 forks source link

Integration Tests (InSpec) #29

Closed arm4b closed 5 years ago

arm4b commented 7 years ago

Partially adresses https://github.com/StackStorm/chef-stackstorm/issues/26

Serverspec/Inspec Integration tests would be nice.

There are already some examples to re-use from the: https://github.com/StackStorm/st2-packages/blob/master/rake/spec/default/60-st2_all-services-ok_spec.rb

jvrplmlmn commented 7 years ago

My vote goes for InSpec over Serverspec, because it opens the possibility of reusing the tests for auditing.

jvrplmlmn commented 7 years ago

I got started with InSpec tests for the 'stackstorm::user' recipe, see #47

arm4b commented 7 years ago

Some thoughts from #47:

I think in future it would be fine to Test installations with custom settings: somehow re-use initial attributes passed by user OR another approach, - read /etc/st2/st2.conf settings like [system_user] and more.

So the Integration Test could be self-sufficient and applied not only just for stackstorm::bundle with all default parameters but for custom installations.

In future I expect users to run InSpec tests for troubleshooting when they experience any Issues with StackStorm Installation.

arm4b commented 7 years ago

~On related note, it may be nice to configure the following directory structure for tests:~

shortdudey123 commented 7 years ago

FWIW, test/unit/... is not typically the standard path. Some cookbooks do it, but most are in the current place (spec/...)

arm4b commented 5 years ago

Done in https://github.com/StackStorm/chef-stackstorm/pull/61 https://github.com/StackStorm/chef-stackstorm/pull/53 https://github.com/StackStorm/chef-stackstorm/pull/52 https://github.com/StackStorm/chef-stackstorm/pull/51