X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b2addc8887d200219b44121c87a7a44bf4566e42..1672501e88972c94bdcab5f681229eb9e9f4a4f6:/services/api/test/functional/arvados/v1/repositories_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/repositories_controller_test.rb b/services/api/test/functional/arvados/v1/repositories_controller_test.rb index b810d69939..cfcd917d65 100644 --- a/services/api/test/functional/arvados/v1/repositories_controller_test.rb +++ b/services/api/test/functional/arvados/v1/repositories_controller_test.rb @@ -52,7 +52,7 @@ class Arvados::V1::RepositoriesControllerTest < ActionController::TestCase end act_as_system_user do u = users(:active) - u.is_active = false + u.unsetup u.save! end authorize_with :admin @@ -200,15 +200,15 @@ class Arvados::V1::RepositoriesControllerTest < ActionController::TestCase end [ - {cfg: :git_repo_ssh_base, cfgval: "git@example.com:", match: %r"^git@example.com:"}, - {cfg: :git_repo_ssh_base, cfgval: true, match: %r"^git@git.zzzzz.arvadosapi.com:"}, - {cfg: :git_repo_ssh_base, cfgval: false, refute: /^git@/ }, - {cfg: :git_repo_https_base, cfgval: "https://example.com/", match: %r"^https://example.com/"}, - {cfg: :git_repo_https_base, cfgval: true, match: %r"^https://git.zzzzz.arvadosapi.com/"}, - {cfg: :git_repo_https_base, cfgval: false, refute: /^http/ }, + {cfg: "GitSSH.ExternalURL", cfgval: URI("ssh://git@example.com"), match: %r"^git@example.com:"}, + {cfg: "GitSSH.ExternalURL", cfgval: URI(""), match: %r"^git@git.zzzzz.arvadosapi.com:"}, + {cfg: "GitSSH", cfgval: false, refute: /^git@/ }, + {cfg: "GitHTTP.ExternalURL", cfgval: URI("https://example.com/"), match: %r"^https://example.com/"}, + {cfg: "GitHTTP.ExternalURL", cfgval: URI(""), match: %r"^https://git.zzzzz.arvadosapi.com/"}, + {cfg: "GitHTTP", cfgval: false, refute: /^http/ }, ].each do |expect| test "set #{expect[:cfg]} to #{expect[:cfgval]}" do - Rails.configuration.send expect[:cfg].to_s+"=", expect[:cfgval] + ConfigLoader.set_cfg Rails.configuration.Services, expect[:cfg].to_s, expect[:cfgval] authorize_with :active get :index assert_response :success