Merge branch 'patch-1' of https://github.com/mr-c/arvados into mr-c-patch-1
[arvados.git] / services / api / test / unit / blob_test.rb
index 707056d2ade5adc295edf07fefd4259e50e544c2..293e28e4fa03e5275e22123b0ceea6cda6ab716e 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 require 'test_helper'
 
 class BlobTest < ActiveSupport::TestCase
@@ -17,7 +21,7 @@ class BlobTest < ActiveSupport::TestCase
     'vu5wm9fpnwjyxfldw3vbo01mgjs75rgo7qioh8z8ij7jpyp8508okhgbbex3ceei' +
     '786u5rw2a9gx743dj3fgq2irk'
   @@known_signed_locator = 'acbd18db4cc2f85cedef654fccc4a4d8+3' +
-    '+A44362129a92a48d02b2e0789c597f970f3b1faf3@7fffffff'
+    '+A89118b78732c33104a4d6231e8b5a5fa1e4301e3@7fffffff'
 
   test 'generate predictable invincible signature' do
     signed = Blob.sign_locator @@known_locator, {
@@ -125,16 +129,16 @@ class BlobTest < ActiveSupport::TestCase
       key: @@known_key,
       expire: 0x7fffffff,
     }
-    assert_equal @@known_signed_locator, signed
 
-    original_ttl = Rails.configuration.blob_signature_ttl
-    Rails.configuration.blob_signature_ttl = original_ttl*2
+    original_ttl = Rails.configuration.Collections.BlobSigningTTL
+    Rails.configuration.Collections.BlobSigningTTL = original_ttl*2
     signed2 = Blob.sign_locator @@known_locator, {
       api_token: @@known_token,
       key: @@known_key,
       expire: 0x7fffffff,
     }
-    Rails.configuration.blob_signature_ttl = original_ttl
+    Rails.configuration.Collections.BlobSigningTTL = original_ttl
+
     assert_not_equal signed, signed2
   end
 end