sensu-plugins / sensu-plugins-serverspec

Sensu plugins for Severspec
http://sensu-plugins.io
MIT License
5 stars 6 forks source link

test_name not unique #3

Closed walkamongus closed 7 years ago

walkamongus commented 8 years ago

The code test_name = serverspec_test['file_path'].split('/')[-1] + '_' + serverspec_test['line_number'].to_s causes test names to duplicate if using a loop in serverspec. The line number is the same for each iteration of the loop.

This means only the last iteration of the loop shows up in Sensu. In my particular case, I have nine examples but only five show up in Sensu -- the other four disappear due to this issue.

Evesy commented 7 years ago

I came across the same issue with sensu-plugins-rspec.

I have proposed a change in https://github.com/sensu-plugins/sensu-plugins-rspec/pull/6 that seeks to address this -- I can port whatever the outcome of that is over to this plugin too

Evesy commented 7 years ago

@majormoses This can be closed off now I believe 👍

majormoses commented 7 years ago

closed in #7