Feature #9260
Facter should detect Scientific Linux CERN
| Status: | Closed | Start date: | 08/30/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | library | |||
| Target version: | 1.6.1 | |||
| Keywords: | Affected Facter version: | |||
| Branch: | ||||
| Votes: | 0 |
Description
Per Andrew Elwell’s request in #7682, Scientific Linux CERN should be differentiated from Scientific Linux since there are variations between the two.
Related issues
History
Updated by Andrew Elwell 9 months ago
Hi – I’ve put a patch together for this — Pull Request on github https://github.com/puppetlabs/facter/pull/39
Updated by Adrien Thebo 9 months ago
- Status changed from Accepted to Tests Insufficient
Thank you very much for the patch! However, what strikes me is that we’re very dependent on the ordering of the checks for SLC and vanilla Scientific Linux – if someone were to refactor this and change the order of the regular expressions, SLC would be misidentified. Would you be willing to add a couple of tests that would catch this case?
Updated by Andrew Elwell 9 months ago
Sure, but I don’t understand how to write ruby testsuites — I’m guessing from a nose round the code that I need to do something in spec/unit/operating*.rb, but don’t get the syntax. Can you point me to a suitable guide / crib note?
Basically I want to check that if text ‘CERN’ is found in /etc/redhat-release it returns SLC and not Scientific. Is this along the right lines?
Updated by Adrien Thebo 9 months ago
There was actually a clarification of policy on how we handle tests, which means that you don’t have to worry about them. However, I think I discovered a bug in how Scientific handles operatingsystemrelease, which I need to chase down. When that’s wrapped up I’ll see about getting this merged. Again, thanks!
And if you’re curious, the spec for your code would look something like https://github.com/adrienthebo/facter/commit/d8de5ae05d5aebb7ab5d23c9a23bd5d43a0d922d
Updated by Adrien Thebo 9 months ago
- Status changed from Tests Insufficient to Merged - Pending Release
Updated by Adrien Thebo 9 months ago
- Category changed from binary to library
Updated by Matthaus Litteken 9 months ago
- Status changed from Merged - Pending Release to Closed
- Target version changed from 1.6.x to 1.6.1
Released in 1.6.1rc2