X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a6c0e01403377311a12f6d9ae587d92dbc00e1fd..cea92754dfacf2b409d1f5b45dd0775fc44c842d:/services/api/test/functional/arvados/v1/collections_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/collections_controller_test.rb b/services/api/test/functional/arvados/v1/collections_controller_test.rb index 8b2725a4bd..ba6929be64 100644 --- a/services/api/test/functional/arvados/v1/collections_controller_test.rb +++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb @@ -2,6 +2,25 @@ require 'test_helper' class Arvados::V1::CollectionsControllerTest < ActionController::TestCase + # StoppedClock.now always returns the same timestamp. + # Set the Blob permission signing clock to ensure that + # all permission hints use consistent timestamps for testing. + + class StoppedClock + @@cached_timestamp = Time.now + def self.now + return @@cached_timestamp + end + end + + def setup + Blob.set_clock(StoppedClock) + end + + def teardown + Blob.set_clock(Time) + end + test "should get index" do authorize_with :active get :index