1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class ContainerRequestIntegrationTest < ActionDispatch::IntegrationTest
9 test "test colon in input" do
10 # Tests for bug #15311 where strings with leading colons get
11 # corrupted when the leading ":" is stripped.
12 val = {"itemSeparator" => ":"}
13 post "/arvados/v1/container_requests",
15 :container_request => {
17 :state => "Committed",
19 :container_image => "fa3c1a9cb6783f85f2ecda037e07b8c3+167",
22 :runtime_constraints => {"vcpus" => 1, "ram" => 1},
26 :content => JSON.parse(SafeJSON.dump(val)),
32 'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:active).api_token}",
33 'CONTENT_TYPE' => 'application/json'
35 assert_response :success
36 assert_equal "arvados#containerRequest", json_response['kind']
37 assert_equal val, json_response['mounts']['foo']['content']