From a5fe0461acaa3b83eb4c066d324cb006b3cf158c Mon Sep 17 00:00:00 2001 From: Jeremy Barlow Date: Mon, 12 Jun 2017 10:54:51 -0700 Subject: [PATCH] (PUP-7652) Allow quotes in report yaml uuid value for catalog_uuid test 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. --- .../catalog_uuid_correlates_catalogs_with_reports.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance/tests/direct_puppet/catalog_uuid_correlates_catalogs_with_reports.rb b/acceptance/tests/direct_puppet/catalog_uuid_correlates_catalogs_with_reports.rb index b635ef5adb9..b860f97227b 100644 --- a/acceptance/tests/direct_puppet/catalog_uuid_correlates_catalogs_with_reports.rb +++ b/acceptance/tests/direct_puppet/catalog_uuid_correlates_catalogs_with_reports.rb @@ -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