-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extra spec tests for redis_exporter #237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one will be good once the redundant spec is removed, and the archive
spec is moved up and grouped with the installs binary
spec.
spec/classes/redis_exporter_spec.rb
Outdated
it { is_expected.to contain_prometheus__daemon('prometheus_redis_exporter') } | ||
it { is_expected.to contain_service('prometheus_redis_exporter') } | ||
it { is_expected.to contain_user('redis-exporter') } | ||
it { is_expected.to contain_file('/opt/redis_exporter-0.11.2.linux-amd64') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem like a required resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it's covered by the spec on line 23 (the spec that tests that it installs the correct binary), and is not needed. The spec on line 23 is also more explicit, since it verifies that /opt/redis_exporter....
is a symlink to /usr/local/bin/redis_exporter
binary install location.
You can remove this condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, i have moved them up to 'install correct binary'
spec/classes/redis_exporter_spec.rb
Outdated
it { is_expected.to contain_service('prometheus_redis_exporter') } | ||
it { is_expected.to contain_user('redis-exporter') } | ||
it { is_expected.to contain_file('/opt/redis_exporter-0.11.2.linux-amd64') } | ||
it { is_expected.to contain_archive('/tmp/redis_exporter-0.11.2.tar.gz') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this one, it seems like this doesn't fit the context of the spec you're adding tests for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should move this up with the installs correct binary
spec, and it would be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, i have moved them up to 'install correct binary'
@blupman thanks for the PR! Can you please rebase against our latest master? That should fix the travis issues. |
@LongLiveCHIEF can you please review this again and merge if you're happy with it? |
extra spec tests for redis_exporter
extra spec tests for redis_exporter
Pull Request (PR) description
I have added a few tests for created resources in redis_exporter.pp
This Pull Request (PR) fixes the following issues