X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3a38dfbc1b558c069511d2c1c5292bcd8690689b..c306aaa029d8e65a4399f27fec982e4e2f72ba8d:/sdk/ruby/test/sdk_fixtures.rb diff --git a/sdk/ruby/test/sdk_fixtures.rb b/sdk/ruby/test/sdk_fixtures.rb index 52d7377f80..28f12b0b02 100644 --- a/sdk/ruby/test/sdk_fixtures.rb +++ b/sdk/ruby/test/sdk_fixtures.rb @@ -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,6 +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") + 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