Refactor #2292
Add tests for virtual.rb
| Status: | Closed | Start: | 05/22/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 1.5.7 | |||
| Branch: | ||||
| Votes: | 0 |
Description
Virtual facts are brittle, we need tests.
History
Updated by James Turnbull over 1 year ago
- Status changed from Unreviewed to Accepted
Updated by Joe McDonagh about 1 year ago
Not only are tests needed but I think it needs to be refactored a bit down near the bottom of virtual.rb where it keeps nesting if->else. That can be transformed into a loop somewhat easily. I have this done at home, just running into one little problem that is driving me insane. But, there are related bugs which I will be filing today.
Updated by Joe McDonagh about 1 year ago
I was just sitting here thinking and realized what I was doing wrong, so tonight from home I will submit a tiny re factor diff that also fixes the other two bugs I filed. IDK if you’ll want the code, but it was fun for me and maybe it will help you guys out somewhat.
Updated by Joe McDonagh about 1 year ago
- File git.diff added
Hey Paul, attached is the diff I was talking about. It refactors down bottom but also fixes detection in a couple cases. I’ll add a note to the other tickets.
Updated by Paul Nasrat about 1 year ago
Thanks – can you make sure your diff is against my working tree for this ticket
http://github.com/pnasrat/facter/tree/tickets/master/2292
Updated by Joe McDonagh about 1 year ago
- File git.diff added
Hey Paul, I’m not entirely convinced I did this diff properly. I followed your instructions, then did a git branch back to my working copy then diffed my virtual.rb against yours and this is what I got. If i’m ‘doin it wrong’ let me know. Thanks.
Updated by Paul Nasrat about 1 year ago
Joe your patch backs out some of my changes, I’ll try forward port but may split out into a seperate ticket to remove the duplication.
Updated by Paul Nasrat about 1 year ago
- Status changed from Accepted to Ready for Testing
Updated by Paul Nasrat about 1 year ago
- Status changed from Ready for Testing to Ready for Checkin
Updated by Paul Nasrat about 1 year ago
- Status changed from Ready for Checkin to Closed
Initial refactor done, will continue to improve as add more facts to this area.
Updated by Paul Nasrat 12 months ago
- Target version changed from 1.6.0 to 1.5.7