X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4600343d1bff7ac4f7b9f08486541444c31af8b6..cadfd226ac8911d34d7dc66ea75ac977ec1319d8:/services/api/test/unit/log_test.rb diff --git a/services/api/test/unit/log_test.rb b/services/api/test/unit/log_test.rb index 7376876bb4..8a878ada91 100644 --- a/services/api/test/unit/log_test.rb +++ b/services/api/test/unit/log_test.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'test_helper' require 'audit_logs' @@ -278,7 +282,7 @@ class LogTest < ActiveSupport::TestCase end test "non-empty configuration.unlogged_attributes" do - Rails.configuration.unlogged_attributes = ["manifest_text"] + Rails.configuration.AuditLogs.UnloggedAttributes = ["manifest_text"] txt = ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n" act_as_system_user do @@ -293,7 +297,7 @@ class LogTest < ActiveSupport::TestCase end test "empty configuration.unlogged_attributes" do - Rails.configuration.unlogged_attributes = [] + Rails.configuration.AuditLogs.UnloggedAttributes = [] txt = ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n" act_as_system_user do @@ -328,8 +332,8 @@ class LogTest < ActiveSupport::TestCase test 'retain old audit logs with default settings' do assert_no_logs_deleted do AuditLogs.delete_old( - max_age: Rails.configuration.max_audit_log_age, - max_batch: Rails.configuration.max_audit_log_delete_batch) + max_age: Rails.configuration.AuditLogs.MaxAge, + max_batch: Rails.configuration.AuditLogs.MaxDeleteBatch) end end @@ -358,8 +362,8 @@ class LogTest < ActiveSupport::TestCase test 'delete old audit logs in thread' do begin - Rails.configuration.max_audit_log_age = 20 - Rails.configuration.max_audit_log_delete_batch = 100000 + Rails.configuration.AuditLogs.MaxAge = 20 + Rails.configuration.AuditLogs.MaxDeleteBatch = 100000 Rails.cache.delete 'AuditLogs' initial_log_count = Log.unscoped.all.count + 1 act_as_system_user do