Cucumber test for data_version value
This commit is contained in:
parent
475d8b4d84
commit
828cac32aa
@ -75,6 +75,10 @@ module.exports = function () {
|
|||||||
got.message = json.message || '';
|
got.message = json.message || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (headers.has('data_version')) {
|
||||||
|
got.data_version = json.data_version || '';
|
||||||
|
}
|
||||||
|
|
||||||
if (headers.has('#')) {
|
if (headers.has('#')) {
|
||||||
// comment column
|
// comment column
|
||||||
got['#'] = row['#'];
|
got['#'] = row['#'];
|
||||||
|
|||||||
@ -17,9 +17,26 @@ Feature: Basic Routing
|
|||||||
| ab |
|
| ab |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route |
|
| from | to | route | data_version |
|
||||||
| a | b | ab,ab |
|
| a | b | ab,ab | |
|
||||||
| b | a | 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
|
Scenario: Routing in between two nodes of way
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@ -71,7 +71,7 @@ class RouteAPI : public BaseAPI
|
|||||||
auto data_timestamp = facade.GetTimestamp();
|
auto data_timestamp = facade.GetTimestamp();
|
||||||
if (!data_timestamp.empty())
|
if (!data_timestamp.empty())
|
||||||
{
|
{
|
||||||
response.values["data_version"] = facade.GetTimestamp();
|
response.values["data_version"] = data_timestamp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user