Skip to content

Commit c5ffda9

Browse files
authored
Fix auth with mock server. (#1057)
There are two issues cause authentication errors. Auth response was mocked with "true" as http_status argument. Also response json was incorrect and incomplete. MockTimestamp has same problem with http_status, so updating it too. Resolves: OLPEDGE-2259 Signed-off-by: Kostiantyn Zvieriev <ext-kostiantyn.zvieriev@here.com>
1 parent 6e06c44 commit c5ffda9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/functional/utils/MockServerHelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ MockServerHelper::MockServerHelper(olp::client::OlpClientSettings settings,
3939
void MockServerHelper::MockTimestamp(time_t time) {
4040
mock_server_client_.MockResponse(
4141
"GET", "/timestamp",
42-
R"({"timestamp" : )" + std::to_string(time) + R"(})", true);
42+
R"({"timestamp" : )" + std::to_string(time) + R"(})");
4343
}
4444

4545
void MockServerHelper::MockAuth() {
4646
mock_server_client_.MockResponse(
4747
"POST", "/oauth2/token",
48-
R"({"access_token": "token","token_type": "bearer"})", true);
48+
R"({"accessToken": "token", "tokenType": "bearer", "expiresIn":86399})");
4949
}
5050

5151
void MockServerHelper::MockGetVersionResponse(

0 commit comments

Comments
 (0)