sensu-plugins / community

Your place to contribute to Sensu plugins and their maintainers
http://sensu-plugins.io
MIT License
20 stars 9 forks source link

Create Best Practices Document for testing #46

Closed mbbroberg closed 6 years ago

mbbroberg commented 7 years ago

migrating from https://github.com/sensu/sensu-summit-notes/issues/9

Basically write up how to write good tests and how the tests work:

mbbroberg commented 6 years ago

I think this should be considered blocked until #58 lands. Thoughts?

majormoses commented 6 years ago

Getting the thoughts written down is the hard part so if someone wants to start thinking about all the things that needed to be discussed and come up with an outline I see no reason to block them. We can always move it somewhere else or update the format later.

mbbroberg commented 6 years ago

Sgtm. Will leave it as a priority and raise it to the community regularly until someone else has free time. It's a great place for someone who wants to be a maintainer to hop in. 

On Wed, Nov 08, 2017 at 10:17 PM Ben Abrams < Ben Abrams ( Ben Abrams notifications@github.com ) > wrote:

Getting the thoughts written down is the hard part so if someone wants to start thinking about all the things that needed to be discussed and come up with an outline I see no reason to block them. We can always move it somewhere else or update the format later.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub ( https://github.com/sensu-plugins/community/issues/46#issuecomment-343058032 ) , or mute the thread ( https://github.com/notifications/unsubscribe-auth/ABqgSy8ptv_LZ8RlIVoYOVh2kHhjOoS_ks5s0pjngaJpZM4PNX8A ).

mattyjones commented 6 years ago

Any traction on this. My head has been up in RSpec for some time now w/ Terraform. It would take much for me to swap some of that to sensu-plugins. I would either do it as a gist in the open here or a GDoc?

majormoses commented 6 years ago

Sorta? I have a couple of blog articles that will be coming out in the next week or two after being reviewed. We are looking to basically use test-kitchen, kitchen-docker, and serverspec. I have rolled it out to a few of the repos a good example is dcos. Once those blog posts come out I think I can sit down and create a more formal document. One of the reasons I like serverspec is that it is really just an extension on rspec and is a bit more "sysadmin" friendly. One of the many benefits of doing it in docker containers is that it forces us to show what are the required dependencies to install a check and use it are. I opted for not using inspec as we are not really testing chef specific stuff and I wanted something a bit more vendor neutral.

majormoses commented 6 years ago

I will compile a list of PRs to link here for the mean time to show what it would look like:

There are others that have the skel in place but not actual tests. I really need to add the testing stuff to skel...

majormoses commented 6 years ago

I have been keeping track here: https://github.com/sensu-plugins/community/issues/41

mattyjones commented 6 years ago

I second the use of ServerSpec and docker along with test-kitchen.Test-kitchen is fast becoming a standard tool in the community. Heck I am using it with terraform ;)

majormoses commented 6 years ago

They are live now:

mbbroberg commented 6 years ago

I believe the posts coming out cover our bases. Leaving this open until we decide where this information lands inside our community.

majormoses commented 6 years ago

I added the testing bits to the skel in https://github.com/sensu-plugins/sensu-plugins-skel/pull/10

mbbroberg commented 6 years ago

Sounds like the right place for it to live. Closing!