puppetlabs/puppetdb — pull request #582 by kbarber (2013-07-28 20:48:20+00:00)
Title: Fix failing import/export test for anonymize full

Previously a regex was failing to dileneate the hostname from the rest of the
metadata from a report filename. In particular, it failed to take into account
extra hyphens in hostnames and times.

This patch fixes the regex so it is able to dileneate the hostname better.

We also order the event reports the same way as puppetdb-export does now, to
ensure we can compare them - and that both tools exhibit the same behaviour
by returning export dumps in the same shape.

This patch fixes the immediate issue, but does bring to light how bad parsing
the file names of reports in export dumps is. I raised a separate issue to fix the
issue properly here: http://projects.puppetlabs.com/issues/21956.

Signed-off-by: Ken Barber