X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ae44eb7e4d96e44ca3dc0481cef7cef354a23292..773413b6decf25e4ab669881e00c507aa8a1486f:/services/api/test/unit/container_test.rb diff --git a/services/api/test/unit/container_test.rb b/services/api/test/unit/container_test.rb index 35e2b7ed1d..375ab5a7bb 100644 --- a/services/api/test/unit/container_test.rb +++ b/services/api/test/unit/container_test.rb @@ -750,6 +750,17 @@ class ContainerTest < ActiveSupport::TestCase check_no_change_from_cancelled c end + test "Container locked with non-expiring token" do + Rails.configuration.API.TokenMaxLifetime = 1.hour + set_user_from_auth :active + c, _ = minimal_new + set_user_from_auth :dispatch1 + assert c.lock, show_errors(c) + refute c.auth.nil? + assert c.auth.expires_at.nil? + assert c.auth.user_id == User.find_by_uuid(users(:active).uuid).id + end + test "Container locked cancel with log" do set_user_from_auth :active c, _ = minimal_new