X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f4ca9ad94a6bb006d1f3c7ba207837f1736d1247..0035033f6bf6db955b116e2e0cc052bc5c79d80e:/services/api/test/functional/arvados/v1/nodes_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/nodes_controller_test.rb b/services/api/test/functional/arvados/v1/nodes_controller_test.rb index 428c663a77..b4ddd78554 100644 --- a/services/api/test/functional/arvados/v1/nodes_controller_test.rb +++ b/services/api/test/functional/arvados/v1/nodes_controller_test.rb @@ -17,8 +17,8 @@ class Arvados::V1::NodesControllerTest < ActionController::TestCase authorize_with :inactive get :index assert_response :success - node_items = JSON.parse(@response.body)['items'] - assert_equal 0, node_items.size + assert_equal 0, json_response['items'].size + assert_equal 0, json_response['items_available'] end # active user sees non-secret attributes of up and recently-up nodes @@ -26,8 +26,9 @@ class Arvados::V1::NodesControllerTest < ActionController::TestCase authorize_with :active get :index assert_response :success - node_items = JSON.parse(@response.body)['items'] - assert_not_equal 0, node_items.size + assert_operator 0, :<, json_response['items_available'] + node_items = json_response['items'] + assert_operator 0, :<, node_items.size found_busy_node = false node_items.each do |node| assert_nil node['info'].andand['ping_secret'] @@ -113,6 +114,7 @@ class Arvados::V1::NodesControllerTest < ActionController::TestCase authorize_with user get :index, {select: ['domain']} assert_response :success + assert_operator 0, :<, json_response['items_available'] end end