diff --git a/features/support/shared_steps.js b/features/support/shared_steps.js index bd16542c7..20fc0cf71 100644 --- a/features/support/shared_steps.js +++ b/features/support/shared_steps.js @@ -75,6 +75,10 @@ module.exports = function () { got.message = json.message || ''; } + if (headers.has('data_version')) { + got.data_version = json.data_version || ''; + } + if (headers.has('#')) { // comment column got['#'] = row['#']; diff --git a/features/testbot/basic.feature b/features/testbot/basic.feature index c7da7b243..0041a133e 100644 --- a/features/testbot/basic.feature +++ b/features/testbot/basic.feature @@ -17,9 +17,26 @@ Feature: Basic Routing | ab | When I route I should get - | from | to | route | - | a | b | ab,ab | - | b | a | ab,ab | + | from | to | route | data_version | + | a | b | ab,ab | | + | b | a | ab,ab | | + + Scenario: Data_version test + Given the node map + """ + a b + """ + + And the extract extra arguments "--data_version cucumber_data_version" + + And the ways + | nodes | + | ab | + + When I route I should get + | from | to | route | data_version | + | a | b | ab,ab | cucumber_data_version | + | b | a | ab,ab | cucumber_data_version | Scenario: Routing in between two nodes of way Given the node map diff --git a/include/engine/api/route_api.hpp b/include/engine/api/route_api.hpp index 5e8040507..caaa92eb3 100644 --- a/include/engine/api/route_api.hpp +++ b/include/engine/api/route_api.hpp @@ -71,7 +71,7 @@ class RouteAPI : public BaseAPI auto data_timestamp = facade.GetTimestamp(); if (!data_timestamp.empty()) { - response.values["data_version"] = facade.GetTimestamp(); + response.values["data_version"] = data_timestamp; } }