Skip to content

Commit

Permalink
fix broken test case of term of service (#12715)
Browse files Browse the repository at this point in the history
Fixed: #12560
  • Loading branch information
kaisecheng authored Mar 3, 2021
1 parent af641a1 commit fce949a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/spec/filters/geoip/download_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ module LogStash module Filters module Geoip
context "rest client" do
it "can call endpoint" do
conn = download_manager.send(:rest_client)
res = conn.get("#{GEOIP_STAGING_ENDPOINT}?key=#{SecureRandom.uuid}")
res = conn.get("#{GEOIP_STAGING_ENDPOINT}?key=#{SecureRandom.uuid}&elastic_geoip_service_tos=agree")
expect(res.status).to eq(200)
end

it "should raise error when endpoint response 4xx" do
conn = download_manager.send(:rest_client)
expect { conn.get("#{GEOIP_STAGING_HOST}?key=#{SecureRandom.uuid}") }.to raise_error /404/
expect { conn.get("#{GEOIP_STAGING_HOST}?key=#{SecureRandom.uuid}&elastic_geoip_service_tos=agree") }.to raise_error /404/
end
end

Expand Down

0 comments on commit fce949a

Please sign in to comment.