HomePhorge

(#5274) Tests for hostprovider removes comments
8efdc769db2eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#5274) Tests for hostprovider removes comments

I noticed that the hostprovider will remove all inline comments from the
/etc/hosts file, when puppet updates at least one entry. Puppet will also
remove comments from entries, the user doesnt want to manage with
puppet.

To split up changes a bit this commit will only introduce tests for the
host type and the hostprovider. A few will fail, indicating the bug:

The hostprovider parses all entries and builds a hash. When building
the recordhash all comments are discarded. When puppet has to update at
least one entry it uses the to_line function to convert the record hash
back to a file. Because the comments are not stored in the hash, they
cannot be written back to the file.

Details

Provenance
Stefan Schulte <stefan.schulte@taunusstein.net>Authored on
Nick Lewis <nick@puppetlabs.com>Committed on Nov 18 2010, 12:55 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU53bb805f118c: Incremented CHANGELOG for 2.6.3
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Lewis <nick@puppetlabs.com> committed rPU8efdc769db2e: (#5274) Tests for hostprovider removes comments (authored by Stefan Schulte <stefan.schulte@taunusstein.net>).Nov 18 2010, 12:55 AM