output = Collection.find_by_uuid cr.output_uuid
assert_equal output_pdh, output.portable_data_hash
assert_equal output.owner_uuid, project.uuid, "Container output should be copied to #{project.uuid}"
+ assert_not_nil output.modified_at
log = Collection.find_by_uuid cr.log_uuid
assert_equal log.manifest_text, ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar
test "Container.resolve_container_image(pdh)" do
set_user_from_auth :active
[[:docker_image, 'v1'], [:docker_image_1_12, 'v2']].each do |coll, ver|
- Rails.configuration.Containers.SupportedDockerImageFormats = [ver]
+ Rails.configuration.Containers.SupportedDockerImageFormats = {ver=>{}}
pdh = collections(coll).portable_data_hash
resolved = Container.resolve_container_image(pdh)
assert_equal resolved, pdh
end
test "migrated docker image" do
- Rails.configuration.Containers.SupportedDockerImageFormats = ['v2']
+ Rails.configuration.Containers.SupportedDockerImageFormats = {'v2'=>{}}
add_docker19_migration_link
# Test that it returns only v2 images even though request is for v1 image.
end
test "use unmigrated docker image" do
- Rails.configuration.Containers.SupportedDockerImageFormats = ['v1']
+ Rails.configuration.Containers.SupportedDockerImageFormats = {'v1'=>{}}
add_docker19_migration_link
# Test that it returns only supported v1 images even though there is a
end
test "incompatible docker image v1" do
- Rails.configuration.Containers.SupportedDockerImageFormats = ['v1']
+ Rails.configuration.Containers.SupportedDockerImageFormats = {'v1'=>{}}
add_docker19_migration_link
# Don't return unsupported v2 image even if we ask for it directly.
end
test "incompatible docker image v2" do
- Rails.configuration.Containers.SupportedDockerImageFormats = ['v2']
+ Rails.configuration.Containers.SupportedDockerImageFormats = {'v2'=>{}}
# No migration link, don't return unsupported v1 image,
set_user_from_auth :active
assert_not_nil(trash)
assert_not_nil(delete)
assert_in_delta(trash, now + 1.second, 10)
- assert_in_delta(delete, now + Rails.configuration.Collections.BlobSigningTTL.second, 10)
+ assert_in_delta(delete, now + Rails.configuration.Collections.BlobSigningTTL, 10)
end
def check_output_ttl_1y(now, trash, delete)