-
Notifications
You must be signed in to change notification settings - Fork 188
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
ENT-2044: Added acceptance test for IP-address classes #5375
Conversation
Added acceptance test for ensuring the existence simplistic IP-address classes Ticket: ENT-2044 Changelog: None Signed-off-by: Lars Erik Wik <[email protected]>
|
||
body common control | ||
{ | ||
bundlesequence => { "test", "check" }; |
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.
Looks like missing include of default.cf.sub which adds machinery for leveraging test.description and methods for pass/fail tests based on classes.
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.
We don't strictly require it, but I think it's nice to use the dcs library. It does a few things:
- Provides a default
bundlesequence
to runinit
,test
,check
if they are defined. - Uses test.description variable in test output
- Provides methods for passing/failing tests based on common checks e.g.
dcs_pass(test)
,dcs_fail(test)
,dcs_passif(class, test)
, etc ...
Lines 96 to 100 in d508301
@nickanderson, from the README I got the impression that it should be avoided for small tests? 🤔 |
But I guess the machinery for leveraging test.description makes it worth it anyways? |
I think it does. I believe it was Jimis who added that note. And it's mostly in relation to speeding up execution IIRC. Which is valid, and why I think it's OK to have it or not. But I pretty much always use dcs. up to you. |
In addition to the speed argument, I like to not use the dcs stuff when the test is simple. Easier to run (just a policy file, no deps), easier to read / understand. |
I'll keep it as is. Because it was really simple to test on Windows. I just copied the file over and ran it directly. |
Merge together with https://github.com/cfengine/enterprise/pull/772