Skip to content

Commit

Permalink
(PUP-7652) Allow quotes in report yaml uuid value for catalog_uuid test
Browse files Browse the repository at this point in the history
Previously, the catalog_uuid_correlates_catalogs_with_reports.rb test
expected the value that it finds for the catalog_uuid in a report yaml
file for an agent run would not be surrounded with single quotes.
Starting with Ruby 2.3.2, however, some uuid values may be surrounded
with single quotes.  Quoting around the value is legal for the yaml
generator to do in either case.  This commit changes the test to
optionally allow for quotes around the value so that it will pass
reliably across Ruby versions.
  • Loading branch information
camlow325 committed Jun 12, 2017
1 parent 3deda98 commit a5fe046
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_catalog_uuid_from_cached_catalog(host, agent_vardir, agent_node_name)
def get_catalog_uuid_from_report(master_reportdir, agent_node_name)
report_catalog_uuid = nil
on(master, "cat #{master_reportdir}/#{agent_node_name}/*") do
report_catalog_uuid = stdout.match(/catalog_uuid: ([a-z0-9\-]*)/)[1]
report_catalog_uuid = stdout.match(/catalog_uuid: '?([a-z0-9\-]*)'?/)[1]
end
report_catalog_uuid
end
Expand Down

0 comments on commit a5fe046

Please sign in to comment.