Merge branch '21041-installer-from-HEAD'. Closes #21041
[arvados.git] / sdk / ruby / test / sdk_fixtures.rb
index 80dfabfdebb317b7451476bff392e57ca18cf94b..28f12b0b02f82d9931af280ec6784b8238b61ab3 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 require "yaml"
 
 module SDKFixtures
@@ -29,7 +33,7 @@ module SDKFixtures
         file = IO.read(path)
         trim_index = file.index('# Test Helper trims the rest of the file')
         file = file[0, trim_index] if trim_index
-        YAML.load(file)
+        YAML.safe_load(file, permitted_classes: [Time])
       end
   end
 
@@ -54,8 +58,11 @@ module SDKFixtures
   NONNORMALIZED_MANIFEST =
     ["./dir2 #{random_block} 0:0:z 0:0:y 0:0:x",
      "./dir1 #{random_block} 0:0:p 0:0:o 0:0:n\n"].join("\n")
-  MULTILEVEL_MANIFEST_WITH_DIRS_IN_FILENAMES =
+  MANIFEST_WITH_DIRS_IN_FILENAMES =
     [". #{random_block(10)} 0:3:file1 3:3:dir1/file1 6:3:dir1/dir2/file1\n"].join("")
+  MULTILEVEL_MANIFEST_WITH_DIRS_IN_FILENAMES =
+    [". #{random_block(10)} 0:3:file1 3:3:dir1/file1 6:4:dir1/dir2/file1\n",
+     "./dir1 #{random_block(10)} 0:3:file1 3:7:dir2/file1\n"].join("")
 
   ### Non-tree manifests
   # These manifests follow the spec, but they express a structure that can't