From 335450990bcb3c2e7b07ebcc663304381008f677 Mon Sep 17 00:00:00 2001 From: geemus Date: Tue, 19 Mar 2024 15:57:08 -0500 Subject: [PATCH 1/2] fix minitest after tests call to newer, non-deprecated style --- test/requests/compute/address_tests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/requests/compute/address_tests.rb b/test/requests/compute/address_tests.rb index f43656aaf..2d855a061 100644 --- a/test/requests/compute/address_tests.rb +++ b/test/requests/compute/address_tests.rb @@ -33,7 +33,7 @@ def compute self.class.compute end - MiniTest::Unit.after_tests do + Minitest.after_run do compute.delete_server(server_id) end From 4aee4a0e83d68891683772ce8e5ff2cdba9c8457 Mon Sep 17 00:00:00 2001 From: geemus Date: Tue, 19 Mar 2024 16:02:40 -0500 Subject: [PATCH 2/2] update/fix yaml safe load arguments in recursive hot file loader --- .../orchestration/util/recursive_hot_file_loader.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fog/openstack/orchestration/util/recursive_hot_file_loader.rb b/lib/fog/openstack/orchestration/util/recursive_hot_file_loader.rb index 826f51b4a..eb6cd1229 100644 --- a/lib/fog/openstack/orchestration/util/recursive_hot_file_loader.rb +++ b/lib/fog/openstack/orchestration/util/recursive_hot_file_loader.rb @@ -68,12 +68,12 @@ def get_template_contents(template_file) template = template_file elsif template_is_raw?(template_file) template_base_url = local_base_url - template = YAML.safe_load(template_file, [Date]) + template = YAML.safe_load(template_file, :permitted_classes => [Date]) elsif template_is_url?(template_file) template_file = normalise_file_path_to_url(template_file) template_base_url = base_url_for_url(template_file) raw_template = read_uri(template_file) - template = YAML.safe_load(raw_template, [Date]) + template = YAML.safe_load(raw_template, :permitted_classes => [Date]) Fog::Logger.debug("Template visited: #{@visited}") @visited.add(template_file) @@ -212,7 +212,7 @@ def normalise_file_path_to_url(path) def deep_copy(item) return item if item.kind_of?(String) - YAML.safe_load(YAML.dump(item), [Date]) + YAML.safe_load(YAML.dump(item), :permitted_classes => [Date]) end end end