Allow to test process parameters#321
Conversation
Any parameter that can be queried with `ps` can be used for tests. For
example:
```
describe process("memcached") do
its(:args) { should match /-c 30000\b/ }
end
```
There was a problem hiding this comment.
For what purpose do you define this?
There was a problem hiding this comment.
If I don't define it, I cannot use --format json or --format html for reports. It is used to get the description of the test right. I didn't look at RSpec, but I suppose that if the class doesn't respond to this message, it will build something from its name. So, maybe this could be moved in the base class instead.
There was a problem hiding this comment.
What rspec version do you use?
I ran a test with rspec v2.14.7 and saw the html report, but I could not see the difference between with to_ary and without to_ary.
I'd like to check the behavior.Please tell me the rspec version you use.
So, maybe this could be moved in the base class instead.
I think so, too.
There was a problem hiding this comment.
I am using RSpec 2.14.7. Try the JSON report, I am sure that it was needed for it. If you cannot reproduce the issue, I will provide a backtrace.
There was a problem hiding this comment.
Thanks. --format json causes the error without to_ary. I got it.
I will move it to the base class after merging this pull request.
Allow to test process parameters
|
I will send a PR for the documentation today. |
|
Thanks a lot! |
|
Released as v0.14.0. |
|
Released as v1.0.0. |
Any parameter that can be queried with
pscan be used for tests. Forexample:
There is a commit needed in specinfra for this to work. Moreover, I had to define
to_aryinProcessclass. I don't know howCgroupclass got to work without it.