aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/client
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/tvmauth/client
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/tvmauth/client')
-rw-r--r--library/cpp/tvmauth/client/ut/checker_ut.cpp8
-rw-r--r--library/cpp/tvmauth/client/ut/disk_cache_ut.cpp22
-rw-r--r--library/cpp/tvmauth/client/ut/facade_ut.cpp10
-rw-r--r--library/cpp/tvmauth/client/ut/logger_ut.cpp12
-rw-r--r--library/cpp/tvmauth/client/ut/settings_ut.cpp2
5 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/tvmauth/client/ut/checker_ut.cpp b/library/cpp/tvmauth/client/ut/checker_ut.cpp
index bec6fb1ec7..54a25974c1 100644
--- a/library/cpp/tvmauth/client/ut/checker_ut.cpp
+++ b/library/cpp/tvmauth/client/ut/checker_ut.cpp
@@ -11,7 +11,7 @@
using namespace NTvmAuth;
-Y_UNIT_TEST_SUITE(ClientChecker) {
+Y_UNIT_TEST_SUITE(ClientChecker) {
static const TTvmId OK_CLIENT = 100500;
static const TString PROD_TICKET = "3:user:CAsQ__________9_Gg4KAgh7EHsg0oXYzAQoAA:N8PvrDNLh-5JywinxJntLeQGDEHBUxfzjuvB8-_BEUv1x9CALU7do8irDlDYVeVVDr4AIpR087YPZVzWPAqmnBuRJS0tJXekmDDvrivLnbRrzY4IUXZ_fImB0fJhTyVetKv6RD11bGqnAJeDpIukBwPTbJc_EMvKDt8V490CJFw";
static const TString TEST_TICKET = "3:user:CA0Q__________9_Gg4KAgh7EHsg0oXYzAQoAQ:FSADps3wNGm92Vyb1E9IVq5M6ZygdGdt1vafWWEhfDDeCLoVA-sJesxMl2pGW4OxJ8J1r_MfpG3ZoBk8rLVMHUFrPa6HheTbeXFAWl8quEniauXvKQe4VyrpA1SPgtRoFqi5upSDIJzEAe1YRJjq1EClQ_slMt8R0kA_JjKUX54";
@@ -20,7 +20,7 @@ Y_UNIT_TEST_SUITE(ClientChecker) {
static const TString STRESS_TICKET = "3:user:CA8Q__________9_Gg4KAgh7EHsg0oXYzAQoBA:GBuG_TLo6SL2OYFxp7Zly04HPNzmAF7Fu2E8E9SnwQDoxq9rf7VThSPtTmnBSAl5UVRRPkMsRtzzHZ87qtj6l-PvF0K7PrDu7-yS_xiFTgAl9sEfXAIHJVzZLoksGRgpoBtpBUg9vVaJsPns0kWFKJgq8M-Mk9agrSk7sb2VUeQ";
static const TString SRV_TICKET = "3:serv:CBAQ__________9_IgYIexCUkQY:GioCM49Ob6_f80y6FY0XBVN4hLXuMlFeyMvIMiDuQnZkbkLpRpQOuQo5YjWoBjM0Vf-XqOm8B7xtrvxSYHDD7Q4OatN2l-Iwg7i71lE3scUeD36x47st3nd0OThvtjrFx_D8mw_c0GT5KcniZlqq1SjhLyAk1b_zJsx8viRAhCU";
- Y_UNIT_TEST(User) {
+ Y_UNIT_TEST(User) {
NTvmApi::TClientSettings s;
s.SetSelfTvmId(OK_CLIENT);
s.EnableServiceTicketChecking();
@@ -103,7 +103,7 @@ Y_UNIT_TEST_SUITE(ClientChecker) {
}
}
- Y_UNIT_TEST(Service) {
+ Y_UNIT_TEST(Service) {
NTvmApi::TClientSettings s;
s.EnableUserTicketChecking(EBlackboxEnv::Stress);
s.SetSelfTvmId(OK_CLIENT);
@@ -140,7 +140,7 @@ Y_UNIT_TEST_SUITE(ClientChecker) {
UNIT_ASSERT_C(l->Stream.Str().find("was successfully fetched") == TString::npos, l->Stream.Str());
}
- Y_UNIT_TEST(Tickets) {
+ Y_UNIT_TEST(Tickets) {
NTvmApi::TClientSettings s;
s.SetSelfTvmId(OK_CLIENT);
s.EnableServiceTicketsFetchOptions("qwerty", {{"blackbox", 19}});
diff --git a/library/cpp/tvmauth/client/ut/disk_cache_ut.cpp b/library/cpp/tvmauth/client/ut/disk_cache_ut.cpp
index 48f4877a52..7dd851c9b3 100644
--- a/library/cpp/tvmauth/client/ut/disk_cache_ut.cpp
+++ b/library/cpp/tvmauth/client/ut/disk_cache_ut.cpp
@@ -16,15 +16,15 @@
using namespace NTvmAuth;
-Y_UNIT_TEST_SUITE(ClientDisk) {
- Y_UNIT_TEST(Hash) {
+Y_UNIT_TEST_SUITE(ClientDisk) {
+ Y_UNIT_TEST(Hash) {
TString hash = TDiskReader::GetHash("asd");
UNIT_ASSERT(hash);
UNIT_ASSERT_VALUES_EQUAL(32, hash.size());
UNIT_ASSERT_VALUES_EQUAL("Zj5_qYg31bPlqjBW76z8IV0rCsHmv-iN-McV6ybS1-g", NUtils::Bin2base64url(hash));
}
- Y_UNIT_TEST(Timestamp) {
+ Y_UNIT_TEST(Timestamp) {
time_t t = 100500;
TString s = TDiskWriter::WriteTimestamp(t);
@@ -44,7 +44,7 @@ Y_UNIT_TEST_SUITE(ClientDisk) {
const TInstant TIME = TInstant::Seconds(100500);
const TString DATA = "oiweuhn \n vw3ut hweoi uhgewproritjhwequtherwoiughfdsv 8ty34q01u 34 1=3";
- Y_UNIT_TEST(ParseData_Ok) {
+ Y_UNIT_TEST(ParseData_Ok) {
TLogger l;
const TInstant time = TInstant::Seconds(1523446554789);
@@ -62,7 +62,7 @@ Y_UNIT_TEST_SUITE(ClientDisk) {
l.Stream.Str());
}
- Y_UNIT_TEST(ParseData_SmallFile) {
+ Y_UNIT_TEST(ParseData_SmallFile) {
TLogger l;
TString toFile = TDiskWriter::PrepareData(TIME, DATA);
@@ -72,7 +72,7 @@ Y_UNIT_TEST_SUITE(ClientDisk) {
l.Stream.Str());
}
- Y_UNIT_TEST(ParseData_Changed) {
+ Y_UNIT_TEST(ParseData_Changed) {
TLogger l;
TString toFile = TDiskWriter::PrepareData(TIME, DATA);
@@ -83,7 +83,7 @@ Y_UNIT_TEST_SUITE(ClientDisk) {
l.Stream.Str());
}
- Y_UNIT_TEST(Read_Ok) {
+ Y_UNIT_TEST(Read_Ok) {
TLogger l;
TDiskReader r(GetFilePath("ok.cache"), &l);
@@ -93,7 +93,7 @@ Y_UNIT_TEST_SUITE(ClientDisk) {
UNIT_ASSERT_C(l.Stream.Str().find("was successfully read") != TString::npos, l.Stream.Str());
}
- Y_UNIT_TEST(Read_NoFile) {
+ Y_UNIT_TEST(Read_NoFile) {
TLogger l;
TDiskReader r("missing", &l);
@@ -103,7 +103,7 @@ Y_UNIT_TEST_SUITE(ClientDisk) {
}
#ifdef _unix_
- Y_UNIT_TEST(Read_NoPermitions) {
+ Y_UNIT_TEST(Read_NoPermitions) {
TLogger l;
const TString path = GetWorkPath() + "/123";
@@ -121,7 +121,7 @@ Y_UNIT_TEST_SUITE(ClientDisk) {
}
#endif
- Y_UNIT_TEST(Write_Ok) {
+ Y_UNIT_TEST(Write_Ok) {
TLogger l;
const TString path = "./tmp_file";
@@ -139,7 +139,7 @@ Y_UNIT_TEST_SUITE(ClientDisk) {
NFs::Remove(path);
}
- Y_UNIT_TEST(Write_NoPermitions) {
+ Y_UNIT_TEST(Write_NoPermitions) {
TLogger l;
TDiskWriter w("/some_file", &l);
diff --git a/library/cpp/tvmauth/client/ut/facade_ut.cpp b/library/cpp/tvmauth/client/ut/facade_ut.cpp
index d839aa4669..62e8e6c731 100644
--- a/library/cpp/tvmauth/client/ut/facade_ut.cpp
+++ b/library/cpp/tvmauth/client/ut/facade_ut.cpp
@@ -9,7 +9,7 @@
using namespace NTvmAuth;
-Y_UNIT_TEST_SUITE(ClientFacade) {
+Y_UNIT_TEST_SUITE(ClientFacade) {
static const TTvmId OK_CLIENT = 100500;
static const TString SRV_TICKET_123 = "3:serv:CBAQ__________9_IgYIexCUkQY:GioCM49Ob6_f80y6FY0XBVN4hLXuMlFeyMvIMiDuQnZkbkLpRpQOuQo5YjWoBjM0Vf-XqOm8B7xtrvxSYHDD7Q4OatN2l-Iwg7i71lE3scUeD36x47st3nd0OThvtjrFx_D8mw_c0GT5KcniZlqq1SjhLyAk1b_zJsx8viRAhCU";
static const TString SRV_TICKET_456 = "3:serv:CBAQ__________9_IgcIyAMQlJEG:VrnqRhpoiDnJeAQbySJluJ1moQ5Kemic99iWzOrHLGfuh7iTw_xMT7KewRAmZMUwDKzE6otj7V86Xsnxbv5xZl8746wbvNcyUXu-nGWmbByZjO7xpSIcY07sISqEhP9n9C_yMSvqDP7ho_PRIfpGCDMXxKlFZ_BhBLLp0kHEvw4";
@@ -27,7 +27,7 @@ Y_UNIT_TEST_SUITE(ClientFacade) {
return f;
}
- Y_UNIT_TEST(Service) {
+ Y_UNIT_TEST(Service) {
NTvmApi::TClientSettings s;
s.SetSelfTvmId(OK_CLIENT);
s.EnableServiceTicketChecking();
@@ -44,7 +44,7 @@ Y_UNIT_TEST_SUITE(ClientFacade) {
UNIT_ASSERT_EXCEPTION(f.CheckUserTicket(TEST_TICKET), yexception);
}
- Y_UNIT_TEST(User) {
+ Y_UNIT_TEST(User) {
NTvmApi::TClientSettings s;
s.EnableUserTicketChecking(EBlackboxEnv::Prod);
s.SetDiskCacheDir(GetCachePath());
@@ -55,7 +55,7 @@ Y_UNIT_TEST_SUITE(ClientFacade) {
UNIT_ASSERT(!f.CheckUserTicket(TEST_TICKET));
}
- Y_UNIT_TEST(Ctors) {
+ Y_UNIT_TEST(Ctors) {
NTvmApi::TClientSettings s;
s.EnableUserTicketChecking(EBlackboxEnv::Prod);
s.SetDiskCacheDir(GetCachePath());
@@ -68,7 +68,7 @@ Y_UNIT_TEST_SUITE(ClientFacade) {
v.front() = std::move(*v.begin());
}
- Y_UNIT_TEST(Tickets) {
+ Y_UNIT_TEST(Tickets) {
NTvmApi::TClientSettings s;
s.SetSelfTvmId(OK_CLIENT);
s.EnableServiceTicketsFetchOptions("qwerty", {{"blackbox", 19}});
diff --git a/library/cpp/tvmauth/client/ut/logger_ut.cpp b/library/cpp/tvmauth/client/ut/logger_ut.cpp
index eded8528df..76236e8913 100644
--- a/library/cpp/tvmauth/client/ut/logger_ut.cpp
+++ b/library/cpp/tvmauth/client/ut/logger_ut.cpp
@@ -6,35 +6,35 @@
using namespace NTvmAuth;
-Y_UNIT_TEST_SUITE(ClientLogger) {
+Y_UNIT_TEST_SUITE(ClientLogger) {
int i = 0;
- Y_UNIT_TEST(Debug) {
+ Y_UNIT_TEST(Debug) {
TLogger l;
l.Debug("qwerty");
UNIT_ASSERT_VALUES_EQUAL("7: qwerty\n", l.Stream.Str());
}
- Y_UNIT_TEST(Info) {
+ Y_UNIT_TEST(Info) {
TLogger l;
l.Info("qwerty");
UNIT_ASSERT_VALUES_EQUAL("6: qwerty\n", l.Stream.Str());
}
- Y_UNIT_TEST(Warning) {
+ Y_UNIT_TEST(Warning) {
TLogger l;
l.Warning("qwerty");
UNIT_ASSERT_VALUES_EQUAL("4: qwerty\n", l.Stream.Str());
}
- Y_UNIT_TEST(Error) {
+ Y_UNIT_TEST(Error) {
TLogger l;
l.Error("qwerty");
UNIT_ASSERT_VALUES_EQUAL("3: qwerty\n", l.Stream.Str());
}
#ifdef _unix_
- Y_UNIT_TEST(Cerr_) {
+ Y_UNIT_TEST(Cerr_) {
TCerrLogger l(5);
l.Error("hit");
l.Debug("miss");
diff --git a/library/cpp/tvmauth/client/ut/settings_ut.cpp b/library/cpp/tvmauth/client/ut/settings_ut.cpp
index 47554dd73d..76c9542442 100644
--- a/library/cpp/tvmauth/client/ut/settings_ut.cpp
+++ b/library/cpp/tvmauth/client/ut/settings_ut.cpp
@@ -6,7 +6,7 @@
using namespace NTvmAuth;
-Y_UNIT_TEST_SUITE(ClientSettings) {
+Y_UNIT_TEST_SUITE(ClientSettings) {
#if !defined(_win_)
Y_UNIT_TEST(CheckValid) {
struct TTestCase {