diff --git a/features/bicycle.feature b/features/bicycle.feature index 4dd4b2c3a..a15b86456 100644 --- a/features/bicycle.feature +++ b/features/bicycle.feature @@ -3,20 +3,18 @@ Feature: Bicycle Routing from A to B To enable bicycle routing OSRM should handle all relevant bicycle tags - Scenario: Respect oneway without additional tags - Scenario: oneway:bicycle When I request a route from 55.673168935147,12.563557740441 to 55.67380116846,12.563107129324& Then I should get a route And the route should follow "Banegårdspladsen" And there should not be any turns - And the distance should be close to 70m + And the distance should be close to 80m Scenario: cycleway=opposite_lane - When I request a route from 55.689236488,12.55317804955 to 55.688510764046,12.552909828648 + When I request a route from 55.689126237262,12.553137305887 to 55.688666612359,12.55296564451 Then I should get a route And the route should follow "Kapelvej" And there should not be any turns - And the distance should be close to 80m + And the distance should be close to 50m diff --git a/features/restrictions.feature b/features/restrictions.feature index b0e4742a6..3e832f409 100644 --- a/features/restrictions.feature +++ b/features/restrictions.feature @@ -11,20 +11,20 @@ Scenario: No left turn when crossing a oneway street And no error should be reported in terminal Scenario: No left turn at T-junction: Don't turn left from side road into main road - When I request a route from 55.66442995717,12.549384056343 to 55.664060815164,12.548944174065 - Then I should get a route - And the route should start at "Sigerstedgade" - And the route should end at "Ingerslevsgade" - And there should be more than 1 turn - And the route should not include "Sigerstedgade, Ingerslevsgade" - -Scenario: No left turn at T-junction: OK to turn right from side road into main road When I request a route from 55.66442995717,12.549384056343 to 55.664218154805,12.5502638209 Then I should get a route And the route should start at "Sigerstedgade" And the route should end at "Ingerslevsgade" - And there should be 1 turn + And the route should not include "Sigerstedgade, Ingerslevsgade" + And there should be more than 1 turn + +Scenario: No left turn at T-junction: OK to turn right from side road into main road + When I request a route from 55.66442995717,12.549384056343 to 55.664060815164,12.548944174065 + Then I should get a route + And the route should start at "Sigerstedgade" + And the route should end at "Ingerslevsgade" And the route should include "Sigerstedgade, Ingerslevsgade" + And there should be 1 turn Scenario: No left turn at T-junction: OK to go straight on main road When I request a route from 55.66419092299,12.550333558335 to 55.664060815164,12.548944174065 @@ -36,14 +36,14 @@ Scenario: No left turn at T-junction: OK to turn right from main road into side Then I should get a route And the route should start at "Ingerslevsgade" And the route should end at "Sigerstedgade" - And there should be 1 turn And the route should include "Ingerslevsgade, Sigerstedgade" + And there should be 1 turn Scenario: No left turn at T-junction: OK to turn left from main road into side road When I request a route from 55.664218154805,12.5502638209 to 55.66442995717,12.549384056343 Then I should get a route And the route should start at "Ingerslevsgade" And the route should end at "Sigerstedgade" - And there should be 1 turn And the route should include "Ingerslevsgade, Sigerstedgade" + And there should be 1 turn diff --git a/features/step_definitions/routing.rb b/features/step_definitions/routing.rb index 4cf22c07c..bb41400c4 100644 --- a/features/step_definitions/routing.rb +++ b/features/step_definitions/routing.rb @@ -114,11 +114,11 @@ def computed_route end Then /^the route should follow "([^"]*)"$/ do |route| - sanitize_route(route).should == computed_route + computed_route.should == sanitize_route(route) end Then /^the route should not follow "([^"]*)"$/ do |route| - sanitize_route(route).should_not == computed_route + computed_route.should_not == sanitize_route(route) end Then /^the route should include "([^"]*)"$/ do |route| diff --git a/test/server.ini b/test/server.ini new file mode 100644 index 000000000..2a6d1dac5 --- /dev/null +++ b/test/server.ini @@ -0,0 +1,9 @@ +Threads = 8 +IP = 0.0.0.0 +Port = 5000 + +hsgrData=data/kbh.osrm.hsgr +nodesData=data/kbh.osrm.nodes +ramIndex=data/kbh.osrm.ramIndex +fileIndex=data/kbh.osrm.fileIndex +namesData=data/kbh.osrm.names