Closed walkamongus closed 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
@majormoses This can be closed off now I believe 👍
closed in #7
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.