projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
16526: Merge branch 'master' into 16526-ruby-and-python-build-script-updates
[arvados.git]
/
services
/
api
/
test
/
functional
/
arvados
/
v1
/
keep_services_controller_test.rb
diff --git
a/services/api/test/functional/arvados/v1/keep_services_controller_test.rb
b/services/api/test/functional/arvados/v1/keep_services_controller_test.rb
index 33c8aad3ea13dedebe1da34dce677dba45eaef9c..ce1d447f16ad0f950327ecfa1e47f7cb24fcd76f 100644
(file)
--- a/
services/api/test/functional/arvados/v1/keep_services_controller_test.rb
+++ b/
services/api/test/functional/arvados/v1/keep_services_controller_test.rb
@@
-37,7
+37,7
@@
class Arvados::V1::KeepServicesControllerTest < ActionController::TestCase
end
test "report configured servers if db is empty" do
end
test "report configured servers if db is empty" do
- KeepService.all.delete_all
+ KeepService.
unscoped.
all.delete_all
expect_rvz = {}
n = 0
Rails.configuration.Services.Keepstore.InternalURLs.each do |k,v|
expect_rvz = {}
n = 0
Rails.configuration.Services.Keepstore.InternalURLs.each do |k,v|
@@
-46,21
+46,20
@@
class Arvados::V1::KeepServicesControllerTest < ActionController::TestCase
expect_rvz[k.to_s] = rvz
Rails.configuration.Services.Keepstore.InternalURLs[k].Rendezvous = rvz
end
expect_rvz[k.to_s] = rvz
Rails.configuration.Services.Keepstore.InternalURLs[k].Rendezvous = rvz
end
- Rails.configuration.Services.Keepproxy.InternalURLs.each do |k,v|
- n += 1
- rvz = "%015x" % n
- expect_rvz[k.to_s] = rvz
- Rails.configuration.Services.Keepproxy.InternalURLs[k].Rendezvous = rvz
- end
+ expect_rvz[Rails.configuration.Services.Keepproxy.ExternalURL] = true
refute_empty expect_rvz
authorize_with :active
get :index,
params: {:format => :json},
headers: auth(:active)
refute_empty expect_rvz
authorize_with :active
get :index,
params: {:format => :json},
headers: auth(:active)
+ assert_response :success
json_response['items'].each do |svc|
json_response['items'].each do |svc|
- url = "#{svc['service_ssl_flag'] ? 'https' : 'http'}://#{svc['service_host']}:#{svc['service_port']}"
+ url = "#{svc['service_ssl_flag'] ? 'https' : 'http'}://#{svc['service_host']}:#{svc['service_port']}
/
"
assert_equal true, expect_rvz.has_key?(url), "#{url} does not match any configured service: expecting #{expect_rvz}"
assert_equal true, expect_rvz.has_key?(url), "#{url} does not match any configured service: expecting #{expect_rvz}"
- assert_equal "zzzzz-bi6l4-#{expect_rvz[url]}", svc['uuid'], "exported service UUID should match InternalURLs.*.Rendezvous value"
+ rvz = expect_rvz[url]
+ if rvz.is_a? String
+ assert_equal "zzzzz-bi6l4-#{rvz}", svc['uuid'], "exported service UUID should match InternalURLs.*.Rendezvous value"
+ end
expect_rvz.delete(url)
end
assert_equal({}, expect_rvz, "all configured Keepstore and Keepproxy services should be returned")
expect_rvz.delete(url)
end
assert_equal({}, expect_rvz, "all configured Keepstore and Keepproxy services should be returned")