Skip to content

Commit 002551c

Browse files
authored
Remove AuthenticationClientTest.SignUpInUser (#1029)
The test is moved to e2e, see HereAuthenticationTest.SignUpInUser Resolves: OLPEDGE-2017 Signed-off-by: Kostiantyn Zvieriev <ext-kostiantyn.zvieriev@here.com>
1 parent 2d999a5 commit 002551c

File tree

1 file changed

+0
-76
lines changed

1 file changed

+0
-76
lines changed

tests/functional/olp-cpp-sdk-authentication/AuthenticationClientTest.cpp

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -357,82 +357,6 @@ TEST_F(AuthenticationClientTest, SignInClientCancel) {
357357
response.GetError().GetErrorCode());
358358
}
359359

360-
TEST_F(AuthenticationClientTest, SignUpInUser) {
361-
const std::string email = GetEmail();
362-
std::cout << "Creating account for: " << email << std::endl;
363-
364-
AuthenticationClient::SignUpResponse signup_response = SignUpUser(email);
365-
EXPECT_EQ(olp::http::HttpStatusCode::CREATED,
366-
signup_response.GetResult().GetStatus());
367-
EXPECT_EQ(kErrorSignUpCreated,
368-
signup_response.GetResult().GetErrorResponse().message);
369-
EXPECT_FALSE(signup_response.GetResult().GetUserIdentifier().empty());
370-
371-
AuthenticationClient::SignInUserResponse response = SignInUser(email);
372-
EXPECT_EQ(olp::http::HttpStatusCode::PRECONDITION_FAILED,
373-
response.GetResult().GetStatus());
374-
EXPECT_EQ(kErrorPreconditionFailedCode,
375-
response.GetResult().GetErrorResponse().code);
376-
EXPECT_EQ(kErrorPreconditionFailedMessage,
377-
response.GetResult().GetErrorResponse().message);
378-
EXPECT_TRUE(response.GetResult().GetAccessToken().empty());
379-
EXPECT_TRUE(response.GetResult().GetTokenType().empty());
380-
EXPECT_TRUE(response.GetResult().GetRefreshToken().empty());
381-
EXPECT_TRUE(response.GetResult().GetUserIdentifier().empty());
382-
EXPECT_FALSE(response.GetResult().GetTermAcceptanceToken().empty());
383-
EXPECT_FALSE(response.GetResult().GetTermsOfServiceUrl().empty());
384-
EXPECT_FALSE(response.GetResult().GetTermsOfServiceUrlJson().empty());
385-
EXPECT_FALSE(response.GetResult().GetPrivatePolicyUrl().empty());
386-
EXPECT_FALSE(response.GetResult().GetPrivatePolicyUrlJson().empty());
387-
388-
AuthenticationClient::SignInUserResponse response2 = AcceptTerms(response);
389-
EXPECT_EQ(olp::http::HttpStatusCode::NO_CONTENT,
390-
response2.GetResult().GetStatus());
391-
EXPECT_EQ(kErrorNoContent, response2.GetResult().GetErrorResponse().message);
392-
EXPECT_TRUE(response2.GetResult().GetAccessToken().empty());
393-
EXPECT_TRUE(response2.GetResult().GetTokenType().empty());
394-
EXPECT_TRUE(response2.GetResult().GetRefreshToken().empty());
395-
EXPECT_TRUE(response2.GetResult().GetUserIdentifier().empty());
396-
EXPECT_TRUE(response2.GetResult().GetTermAcceptanceToken().empty());
397-
EXPECT_TRUE(response2.GetResult().GetTermsOfServiceUrl().empty());
398-
EXPECT_TRUE(response2.GetResult().GetTermsOfServiceUrlJson().empty());
399-
EXPECT_TRUE(response2.GetResult().GetPrivatePolicyUrl().empty());
400-
EXPECT_TRUE(response2.GetResult().GetPrivatePolicyUrlJson().empty());
401-
402-
AuthenticationClient::SignInUserResponse response3 = SignInUser(email);
403-
EXPECT_EQ(olp::http::HttpStatusCode::OK, response3.GetResult().GetStatus());
404-
EXPECT_STREQ(kErrorOk.c_str(),
405-
response3.GetResult().GetErrorResponse().message.c_str());
406-
EXPECT_FALSE(response3.GetResult().GetAccessToken().empty());
407-
EXPECT_FALSE(response3.GetResult().GetTokenType().empty());
408-
EXPECT_FALSE(response3.GetResult().GetRefreshToken().empty());
409-
EXPECT_FALSE(response3.GetResult().GetUserIdentifier().empty());
410-
EXPECT_TRUE(response3.GetResult().GetTermAcceptanceToken().empty());
411-
EXPECT_TRUE(response3.GetResult().GetTermsOfServiceUrl().empty());
412-
EXPECT_TRUE(response3.GetResult().GetTermsOfServiceUrlJson().empty());
413-
EXPECT_TRUE(response3.GetResult().GetPrivatePolicyUrl().empty());
414-
EXPECT_TRUE(response3.GetResult().GetPrivatePolicyUrlJson().empty());
415-
416-
AuthenticationTestUtils::DeleteUserResponse response4 =
417-
DeleteUser(response3.GetResult().GetAccessToken());
418-
EXPECT_EQ(olp::http::HttpStatusCode::NO_CONTENT, response4.status);
419-
EXPECT_STREQ(kErrorNoContent.c_str(), response4.error.c_str());
420-
421-
AuthenticationClient::SignInUserResponse response5 = SignInUser(email);
422-
// According to the AAA team, we should expect one of 401 or 404 status.
423-
EXPECT_THAT(
424-
response5.GetResult().GetStatus(),
425-
testing::AnyOf(testing::Eq(olp::http::HttpStatusCode::UNAUTHORIZED),
426-
testing::Eq(olp::http::HttpStatusCode::NOT_FOUND)))
427-
<< GetErrorId(response5);
428-
EXPECT_EQ(kErrorAccountNotFoundCode,
429-
response5.GetResult().GetErrorResponse().code)
430-
<< GetErrorId(response5);
431-
EXPECT_EQ(kErrorAccountNotFoundMessage,
432-
response5.GetResult().GetErrorResponse().message)
433-
<< GetErrorId(response5);
434-
}
435-
436360
TEST_F(AuthenticationClientTest, SignUpUserCancel) {
437361
const std::string email = GetEmail();
438362
std::cout << "Creating account for: " << email << std::endl;

0 commit comments

Comments
 (0)