From: Ward Vandewege Date: Mon, 21 Jan 2013 16:12:04 +0000 (-0500) Subject: More test env tweaks + first collections api test X-Git-Tag: 1.1.0~3491 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/91ef706d4c57a455c34aaa8e4b310f616d179b6a More test env tweaks + first collections api test --- diff --git a/config/environments/test.rb b/config/environments/test.rb index 2f0aef8cc3..728fc14dd2 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -43,11 +43,11 @@ Server::Application.configure do # config.compute_node_domain = `hostname --domain`.strip + # No need for SSL while testing + config.force_ssl = false + # config.compute_node_nameservers = ['1.2.3.4', '1.2.3.5'] - require 'net/http' - config.compute_node_nameservers = ['local', 'public'].collect do |iface| - Net::HTTP.get(URI("http://169.254.169.254/latest/meta-data/#{iface}-ipv4")).match(/^[\d\.]+$/)[0] - end << '172.16.0.23' + config.compute_node_nameservers = [ "172.16.0.23" ] config.uuid_prefix('test@' + `hostname`.strip) end diff --git a/test/integration/collections_api_test.rb b/test/integration/collections_api_test.rb new file mode 100644 index 0000000000..7051c4cfd7 --- /dev/null +++ b/test/integration/collections_api_test.rb @@ -0,0 +1,13 @@ +require 'test_helper' + +class CollectionsApiTest < ActionDispatch::IntegrationTest + fixtures :all + + test "should get index" do + get "/orvos/v1/collections", :format => :json + @json_response ||= ActiveSupport::JSON.decode @response.body + assert_response :success + assert_equal "orvos#collectionList", @json_response['kind'] + end + +end