Commit f12840db authored by Volker Krause's avatar Volker Krause
Browse files

Ensure we have at least one complete coverage area everywhere

parent 6be69100
......@@ -33,9 +33,16 @@ private Q_SLOTS:
for (const auto &b : mgr.backends()) {
QVERIFY(!b.identifier().isEmpty());
QVERIFY(!b.name().isEmpty());
// TODO make this mandatory once all configurations have it
if (b.coverageArea(CoverageArea::Realtime).isEmpty() && b.coverageArea(CoverageArea::Regular).isEmpty() && b.coverageArea(CoverageArea::Any).isEmpty()) {
qWarning() << b.identifier() << "has no coverage areas defined!";
QVERIFY(!b.coverageArea(CoverageArea::Realtime).isEmpty() || !b.coverageArea(CoverageArea::Regular).isEmpty() || !b.coverageArea(CoverageArea::Any).isEmpty());
for (const auto &type : {CoverageArea::Realtime, CoverageArea::Regular, CoverageArea::Any}) {
const auto c = b.coverageArea(type);
if (c.isEmpty()) {
continue;
}
QCOMPARE(c.type(), type);
QVERIFY(c.regions().size() > 0);
}
}
}
......
......@@ -45,7 +45,7 @@
"name": "DB Fernverkehr AG"
},
"coverage": {
"anyCoverage": {
"realtimeCoverage": {
"area": {
"coordinates": [
[
......@@ -72,7 +72,8 @@
]
],
"type": "Polygon"
}
},
"region": [ "AT", "CH", "DE", "LI", "LU" ]
}
},
"options": {
......
......@@ -65,7 +65,8 @@
]
],
"type": "Polygon"
}
},
"region": [ "EU" ]
}
},
"options": {
......
......@@ -36,6 +36,19 @@
"name": "Accessibility Cloud by Sozialhelden e.V.",
"url": "https://accessibility.cloud/"
},
"coverage": {
"realtimeCoverage": {
"area": {
"coordinates": [
[
[ -180.0, -90.0 ], [ -180.0, 90.0 ], [ 180.0, 90.0 ], [ 180.0, -90.0 ], [ -180.0, -90.0 ]
]
],
"type": "Polygon"
},
"region": [ "UN" ]
}
},
"options": {
"token": "d45e7a23f6b20679a6bbdd59829cbce8"
},
......
......@@ -36,6 +36,19 @@
"Name[uk]": "Велосипеди і скутери спільного користування",
"Name[x-test]": "xxShared bikes/scootersxx"
},
"coverage": {
"realtimeCoverage": {
"area": {
"coordinates": [
[
[ -180.0, -90.0 ], [ -180.0, 90.0 ], [ 180.0, 90.0 ], [ 180.0, -90.0 ], [ -180.0, -90.0 ]
]
],
"type": "Polygon"
},
"region": [ "UN" ]
}
},
"type": {
"gbfs": true
}
......
......@@ -43,6 +43,19 @@
"name": "© navitia.io",
"url": "https://www.navitia.io/"
},
"coverage": {
"regularCoverage": {
"area": {
"coordinates": [
[
[ -180.0, -90.0 ], [ -180.0, 90.0 ], [ 180.0, 90.0 ], [ 180.0, -90.0 ], [ -180.0, -90.0 ]
]
],
"type": "Polygon"
},
"region": [ "AT", "AU", "BE", "BR", "CA", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GH", "HU", "IE", "IL", "IT", "LU", "NI", "NL", "NZ", "PL", "PT", "RU", "SE", "UK", "US" ]
}
},
"options": {
"authorization": "48ed1733-d3f0-445a-9210-9fb36e20a8a3",
"endpoint": "api.navitia.io"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment