Skip to content

Commit 5db27aa

Browse files
authored
Update Lookup API in.here.com to sit.here.com (#1155)
Also the tests updated to be on the same page with real API. Relates-To: OLPEDGE-2436 Signed-off-by: Mykola Malik <[email protected]>
1 parent 761ea51 commit 5db27aa

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

olp-cpp-sdk-core/src/client/DefaultLookupEndpointProvider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ std::string DefaultLookupEndpointProvider::operator()(
3030
} kDatastoreServerUrl[4] = {
3131
{"here", "https://api-lookup.data.api.platform.here.com/lookup/v1"},
3232
{"here-dev",
33-
"https://api-lookup.data.api.platform.in.here.com/lookup/v1"},
33+
"https://api-lookup.data.api.platform.sit.here.com/lookup/v1"},
3434
{"here-cn", "https://api-lookup.data.api.platform.hereolp.cn/lookup/v1"},
3535
{"here-cn-dev",
3636
"https://api-lookup.data.api.platform.in.hereolp.cn/lookup/v1"}};

olp-cpp-sdk-core/tests/client/ApiLookupClientImplTest.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ using testing::_;
3030
using testing::Return;
3131

3232
constexpr auto kConfigBaseUrl =
33-
"https://config.data.api.platform.in.here.com/config/v1";
33+
"https://config.data.api.platform.sit.here.com/config/v1";
3434

3535
constexpr auto kResponseLookupResource =
36-
R"jsonString([{"api":"random_service","version":"v8","baseURL":"https://config.data.api.platform.in.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}}])jsonString";
36+
R"jsonString([{"api":"random_service","version":"v8","baseURL":"https://config.data.api.platform.sit.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}}])jsonString";
3737

3838
constexpr auto kResponseLookupPlatform =
39-
R"jsonString([{"api":"config","version":"v1","baseURL":"https://config.data.api.platform.in.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}}])jsonString";
39+
R"jsonString([{"api":"config","version":"v1","baseURL":"https://config.data.api.platform.sit.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}}])jsonString";
4040

4141
class ApiLookupClientImplTestable : public client::ApiLookupClientImpl {
4242
public:
@@ -74,7 +74,7 @@ TEST_F(ApiLookupClientImplTest, LookupApi) {
7474
const std::string service_url = "http://random_service.com";
7575
const std::string service_version = "v8";
7676
const std::string config_url =
77-
"https://config.data.api.platform.in.here.com/config/v1";
77+
"https://config.data.api.platform.sit.here.com/config/v1";
7878
const std::string cache_key =
7979
catalog + "::" + service_name + "::" + service_version + "::api";
8080
const std::string lookup_url =
@@ -432,7 +432,7 @@ TEST_F(ApiLookupClientImplTest, CustomProvider) {
432432
const std::string service_url = "http://random_service.com";
433433
const std::string service_version = "v8";
434434
const std::string config_url =
435-
"https://config.data.api.platform.in.here.com/config/v1";
435+
"https://config.data.api.platform.sit.here.com/config/v1";
436436
const std::string lookup_url = "https://some-lookup-url.com/lookup/v1";
437437
const std::string request_lookup_url =
438438
lookup_url + "/resources/" + catalog + "/apis";
@@ -532,7 +532,7 @@ TEST_F(ApiLookupClientImplTest, LookupApiAsync) {
532532
const std::string service_url = "http://random_service.com";
533533
const std::string service_version = "v8";
534534
const std::string config_url =
535-
"https://config.data.api.platform.in.here.com/config/v1";
535+
"https://config.data.api.platform.sit.here.com/config/v1";
536536
const std::string cache_key =
537537
catalog + "::" + service_name + "::" + service_version + "::api";
538538
const std::string lookup_url =
@@ -878,7 +878,7 @@ TEST_F(ApiLookupClientImplTest, CustomProviderAsync) {
878878
const std::string service_url = "http://random_service.com";
879879
const std::string service_version = "v8";
880880
const std::string config_url =
881-
"https://config.data.api.platform.in.here.com/config/v1";
881+
"https://config.data.api.platform.sit.here.com/config/v1";
882882
const std::string lookup_url = "https://some-lookup-url.com/lookup/v1";
883883
const std::string request_lookup_url =
884884
lookup_url + "/resources/" + catalog + "/apis";

olp-cpp-sdk-core/tests/client/DefaultLookupEndpointProviderTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ TEST(DefaultLookupEndpointProviderTest, ParenthesisOperator) {
3030
} valid_apis[] = {
3131
{"here", "https://api-lookup.data.api.platform.here.com/lookup/v1"},
3232
{"here-dev",
33-
"https://api-lookup.data.api.platform.in.here.com/lookup/v1"},
33+
"https://api-lookup.data.api.platform.sit.here.com/lookup/v1"},
3434
{"here-cn", "https://api-lookup.data.api.platform.hereolp.cn/lookup/v1"},
3535
{"here-cn-dev",
3636
"https://api-lookup.data.api.platform.in.hereolp.cn/lookup/v1"}};

olp-cpp-sdk-dataservice-read/src/ApiClientLookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ constexpr auto kLogTag = "ApiClientLookupRead";
4444
std::string GetDatastoreServerUrl(const std::string& partition) {
4545
static const std::map<std::string, std::string> kDatastoreServerUrl = {
4646
{"here", "data.api.platform.here.com"},
47-
{"here-dev", "data.api.platform.in.here.com"},
47+
{"here-dev", "data.api.platform.sit.here.com"},
4848
{"here-cn", "data.api.platform.hereolp.cn"},
4949
{"here-cn-dev", "data.api.platform.in.hereolp.cn"}};
5050

olp-cpp-sdk-dataservice-read/tests/ApiClientLookupTest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ namespace client = olp::client;
2727
namespace read = olp::dataservice::read;
2828

2929
const auto kConfigBaseUrl =
30-
"https://config.data.api.platform.in.here.com/config/v1";
30+
"https://config.data.api.platform.sit.here.com/config/v1";
3131

3232
const auto kResponseLookupConfig =
33-
R"jsonString([{"api":"random_service","version":"v8","baseURL":"https://config.data.api.platform.in.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}}])jsonString";
33+
R"jsonString([{"api":"random_service","version":"v8","baseURL":"https://config.data.api.platform.sit.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}}])jsonString";
3434

3535
TEST(ApiClientLookupTest, LookupApi) {
3636
using testing::_;
@@ -51,7 +51,7 @@ TEST(ApiClientLookupTest, LookupApi) {
5151
const std::string service_url = "http://random_service.com";
5252
const std::string service_version = "v8";
5353
const std::string config_url =
54-
"https://config.data.api.platform.in.here.com/config/v1";
54+
"https://config.data.api.platform.sit.here.com/config/v1";
5555
const std::string cache_key =
5656
catalog + "::" + service_name + "::" + service_version + "::api";
5757
const std::string lookup_url =
@@ -242,7 +242,7 @@ TEST(ApiClientLookupTest, LookupApiConcurrent) {
242242
const std::string service_url = "http://random_service.com";
243243
const std::string service_version = "v8";
244244
const std::string config_url =
245-
"https://config.data.api.platform.in.here.com/config/v1";
245+
"https://config.data.api.platform.sit.here.com/config/v1";
246246
const std::string cache_key =
247247
catalog + "::" + service_name + "::" + service_version + "::api";
248248
const std::string lookup_url =

olp-cpp-sdk-dataservice-read/tests/CatalogRepositoryTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ constexpr auto kLatestCatalogVersion =
3939
constexpr auto kResponseLatestCatalogVersion =
4040
R"jsonString({"version":4})jsonString";
4141
constexpr auto kUrlConfig =
42-
R"(https://config.data.api.platform.in.here.com/config/v1/catalogs/hrn:here:data::olp-here-test:hereos-internal-test-v2)";
42+
R"(https://config.data.api.platform.sit.here.com/config/v1/catalogs/hrn:here:data::olp-here-test:hereos-internal-test-v2)";
4343
constexpr auto
4444
kResponseConfig =
4545
R"jsonString({"id":"hereos-internal-test","hrn":"hrn:here-dev:data:::hereos-internal-test","name":"hereos-internal-test","summary":"Internal test for hereos","description":"Used for internal testing on the staging olp.","contacts":{},"owner":{"creator":{"id":"HERE-88c95a7e-4123-4dcd-ae0e-4682aa5c3db4"},"organisation":{"id":"olp-here"}},"tags":[],"billingTags":[],"created":"2018-07-13T20:50:08.425Z","layers":[{"id":"hype-test-prefetch","hrn":"hrn:here-dev:data:::hereos-internal-test:hype-test-prefetch","name":"Hype Test Prefetch","summary":"hype prefetch testing","description":"Layer for hype prefetch testing","coverage":{"adminAreas":[]},"owner":{"creator":{"id":"HERE-88c95a7e-4123-4dcd-ae0e-4682aa5c3db4"},"organisation":{"id":"olp-here"}},"partitioningScheme":"heretile","partitioning":{"tileLevels":[],"scheme":"heretile"},"contentType":"application/x-protobuf","volume":{"volumeType":"durable"},"tags":[],"billingTags":[],"created":"2018-07-13T20:56:19.181Z","layerType":"versioned"},{"id":"testlayer_res","hrn":"hrn:here-dev:data:::hereos-internal-test:testlayer_res","name":"Resource Test Layer","summary":"testlayer_res","description":"testlayer_res","coverage":{"adminAreas":[]},"owner":{"creator":{"id":"HERE-88c95a7e-4123-4dcd-ae0e-4682aa5c3db4"},"organisation":{"id":"olp-here"}},"partitioningScheme":"generic","partitioning":{"scheme":"generic"},"contentType":"application/x-protobuf","volume":{"volumeType":"durable"},"tags":["TEST"],"billingTags":[],"created":"2018-07-13T20:56:19.181Z","layerType":"versioned"},{"id":"testlayer","hrn":"hrn:here-dev:data:::hereos-internal-test:testlayer","name":"Test Layer","summary":"A test layer","description":"A simple test layer","coverage":{"adminAreas":[]},"owner":{"creator":{"id":"HERE-88c95a7e-4123-4dcd-ae0e-4682aa5c3db4"},"organisation":{"id":"olp-here"}},"partitioningScheme":"generic","partitioning":{"scheme":"generic"},"contentType":"application/x-protobuf","volume":{"volumeType":"durable"},"tags":["TEST"],"billingTags":[],"created":"2018-07-13T20:56:19.181Z","layerType":"versioned"},{"id":"testlayer_volatile","ttl":1000,"hrn":"hrn:here-dev:data:::hereos-internal-test:testlayer","name":"Test Layer","summary":"A test layer","description":"A simple test layer","coverage":{"adminAreas":[]},"owner":{"creator":{"id":"HERE-88c95a7e-4123-4dcd-ae0e-4682aa5c3db4"},"organisation":{"id":"olp-here"}},"partitioningScheme":"generic","partitioning":{"scheme":"generic"},"contentType":"application/x-protobuf","volume":{"volumeType":"durable"},"tags":["TEST"],"billingTags":[],"created":"2018-07-13T20:56:19.181Z","layerType":"volatile"},{"id":"testlayer_stream","hrn":"hrn:here-dev:data:::hereos-internal-test:testlayer","name":"Test Layer","summary":"A test layer","description":"A simple test layer","coverage":{"adminAreas":[]},"owner":{"creator":{"id":"HERE-88c95a7e-4123-4dcd-ae0e-4682aa5c3db4"},"organisation":{"id":"olp-here"}},"partitioningScheme":"generic","partitioning":{"scheme":"generic"},"contentType":"application/x-protobuf","volume":{"volumeType":"durable"},"tags":["TEST"],"billingTags":[],"created":"2018-07-13T20:56:19.181Z","layerType":"stream"},{"id":"multilevel_testlayer","hrn":"hrn:here-dev:data:::hereos-internal-test:multilevel_testlayer","name":"Multi Level Test Layer","summary":"Multi Level Test Layer","description":"A multi level test layer just for testing","coverage":{"adminAreas":[]},"owner":{"creator":{"id":"HERE-88c95a7e-4123-4dcd-ae0e-4682aa5c3db4"},"organisation":{"id":"olp-here"}},"partitioningScheme":"generic","partitioning":{"scheme":"generic"},"contentType":"application/x-protobuf","volume":{"volumeType":"durable"},"tags":["TEST"],"billingTags":[],"created":"2018-07-13T20:56:19.181Z","layerType":"versioned"},{"id":"hype-test-prefetch-2","hrn":"hrn:here-dev:data:::hereos-internal-test:hype-test-prefetch-2","name":"Hype Test Prefetch2","summary":"Layer for testing hype2 prefetching","description":"Layer for testing hype2 prefetching","coverage":{"adminAreas":[]},"owner":{"creator":{"id":"HERE-88c95a7e-4123-4dcd-ae0e-4682aa5c3db4"},"organisation":{"id":"olp-here"}},"partitioningScheme":"heretile","partitioning":{"tileLevels":[],"scheme":"heretile"},"contentType":"application/x-protobuf","volume":{"volumeType":"durable"},"tags":["TEST"],"billingTags":[],"created":"2018-07-24T17:52:23.818Z","layerType":"versioned"}],"version":3})jsonString";
4646
constexpr auto kUrlLookupConfig =
4747
R"(https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis)";
4848
constexpr auto kResponseLookupConfig =
49-
R"jsonString([{"api":"config","version":"v1","baseURL":"https://config.data.api.platform.in.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}}])jsonString";
49+
R"jsonString([{"api":"config","version":"v1","baseURL":"https://config.data.api.platform.sit.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}}])jsonString";
5050
constexpr auto kStartVersion = 3;
5151
constexpr auto kEndVersion = 4;
5252
constexpr auto kUrlVersionsList =

olp-cpp-sdk-dataservice-read/tests/PartitionsRepositoryTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ const std::string kOlpSdkUrlLookupConfig =
100100
R"(https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis)";
101101

102102
const std::string kOlpSdkHttpResponseLookupConfig =
103-
R"jsonString([{"api":"config","version":"v1","baseURL":"https://config.data.api.platform.in.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}}])jsonString";
103+
R"jsonString([{"api":"config","version":"v1","baseURL":"https://config.data.api.platform.sit.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}}])jsonString";
104104

105105
const std::string kOlpSdkUrlConfig =
106-
R"(https://config.data.api.platform.in.here.com/config/v1/catalogs/hrn:here:data::olp-here-test:hereos-internal-test-v2)";
106+
R"(https://config.data.api.platform.sit.here.com/config/v1/catalogs/hrn:here:data::olp-here-test:hereos-internal-test-v2)";
107107

108108
const std::string
109109
kOlpSdkHttpResponseConfig =

olp-cpp-sdk-dataservice-write/src/ApiClientLookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ constexpr auto kLogTag = "ApiClientLookupWrite";
3838
std::string GetDatastoreServerUrl(const std::string& partition) {
3939
static const std::map<std::string, std::string> kDatastoreServerUrl = {
4040
{"here", "data.api.platform.here.com"},
41-
{"here-dev", "data.api.platform.in.here.com"},
41+
{"here-dev", "data.api.platform.sit.here.com"},
4242
{"here-cn", "data.api.platform.hereolp.cn"},
4343
{"here-cn-dev", "data.api.platform.in.hereolp.cn"}};
4444

tests/integration/olp-cpp-sdk-core/ApiLookupClientTest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ using testing::_;
3232
using testing::Return;
3333

3434
constexpr auto kConfigBaseUrl =
35-
"https://config.data.api.platform.in.here.com/config/v1";
35+
"https://config.data.api.platform.sit.here.com/config/v1";
3636

3737
constexpr auto kResponseLookupResource =
38-
R"jsonString([{"api":"random_service","version":"v8","baseURL":"https://config.data.api.platform.in.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}}])jsonString";
38+
R"jsonString([{"api":"random_service","version":"v8","baseURL":"https://config.data.api.platform.sit.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}}])jsonString";
3939

4040
constexpr auto kResponseLookupPlatform =
41-
R"jsonString([{"api":"config","version":"v1","baseURL":"https://config.data.api.platform.in.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.in.here.com/pipeline-service","parameters":{}}])jsonString";
41+
R"jsonString([{"api":"config","version":"v1","baseURL":"https://config.data.api.platform.sit.here.com/config/v1","parameters":{}},{"api":"pipelines","version":"v1","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}},{"api":"pipelines","version":"v2","baseURL":"https://pipelines.api.platform.sit.here.com/pipeline-service","parameters":{}}])jsonString";
4242

4343
class ApiLookupClientTest : public ::testing::Test {
4444
void SetUp() override {
@@ -63,7 +63,7 @@ TEST_F(ApiLookupClientTest, LookupApi) {
6363
const std::string service_name = "random_service";
6464
const std::string service_version = "v8";
6565
const std::string config_url =
66-
"https://config.data.api.platform.in.here.com/config/v1";
66+
"https://config.data.api.platform.sit.here.com/config/v1";
6767
const std::string cache_key =
6868
catalog + "::" + service_name + "::" + service_version + "::api";
6969
const std::string lookup_url =
@@ -347,7 +347,7 @@ TEST_F(ApiLookupClientTest, LookupApiAsync) {
347347
const std::string service_name = "random_service";
348348
const std::string service_version = "v8";
349349
const std::string config_url =
350-
"https://config.data.api.platform.in.here.com/config/v1";
350+
"https://config.data.api.platform.sit.here.com/config/v1";
351351
const std::string cache_key =
352352
catalog + "::" + service_name + "::" + service_version + "::api";
353353
const std::string lookup_url =

0 commit comments

Comments
 (0)