@@ -872,54 +872,6 @@ Y_UNIT_TEST_SUITE(TSchemeShardLoginTest) {
872872 });
873873 CheckUserIsLockedOutPermanently (runtime);
874874 }
875-
876- Y_UNIT_TEST (CheckTimeOfUserCreating) {
877- TTestBasicRuntime runtime;
878- TTestEnv env (runtime);
879- ui64 txId = 100 ;
880-
881- {
882- auto describe = DescribePath (runtime, TTestTxConfig::SchemeShard, " /MyRoot" );
883- CheckSecurityState (describe, {.PublicKeysSize = 0 , .SidsSize = 0 });
884- }
885-
886-
887- {
888- std::chrono::time_point<std::chrono::system_clock> start = std::chrono::system_clock::now ();
889- CreateAlterLoginCreateUser (runtime, ++txId, " /MyRoot" , " user1" , " password1" );
890- std::chrono::time_point<std::chrono::system_clock> finish = std::chrono::system_clock::now ();
891- auto describeResult = DescribePath (runtime, TTestTxConfig::SchemeShard, " /MyRoot" );
892- CheckSecurityState (describeResult, {.PublicKeysSize = 0 , .SidsSize = 1 });
893-
894- NLogin::TLoginProvider tmpLoginProvider;
895- tmpLoginProvider.UpdateSecurityState (describeResult.GetPathDescription ().GetDomainDescription ().GetSecurityState ());
896- const auto & sid = tmpLoginProvider.Sids [" user1" ];
897- UNIT_ASSERT (sid.CreatedAt >= start && sid.CreatedAt <= finish);
898- }
899-
900- {
901- std::chrono::time_point<std::chrono::system_clock> start = std::chrono::system_clock::now ();
902- CreateAlterLoginCreateUser (runtime, ++txId, " /MyRoot" , " user2" , " password2" );
903- std::chrono::time_point<std::chrono::system_clock> finish = std::chrono::system_clock::now ();
904- auto describeResult = DescribePath (runtime, TTestTxConfig::SchemeShard, " /MyRoot" );
905- CheckSecurityState (describeResult, {.PublicKeysSize = 0 , .SidsSize = 2 });
906-
907- NLogin::TLoginProvider tmpLoginProvider;
908- tmpLoginProvider.UpdateSecurityState (describeResult.GetPathDescription ().GetDomainDescription ().GetSecurityState ());
909- const auto & sid = tmpLoginProvider.Sids [" user2" ];
910- UNIT_ASSERT (sid.CreatedAt >= start && sid.CreatedAt <= finish);
911- }
912-
913- {
914- auto describeResult = DescribePath (runtime, TTestTxConfig::SchemeShard, " /MyRoot" );
915- NLogin::TLoginProvider tmpLoginProvider;
916- tmpLoginProvider.UpdateSecurityState (describeResult.GetPathDescription ().GetDomainDescription ().GetSecurityState ());
917- const auto & sid1 = tmpLoginProvider.Sids [" user1" ];
918- const auto & sid2 = tmpLoginProvider.Sids [" user2" ];
919-
920- UNIT_ASSERT (sid1.CreatedAt < sid2.CreatedAt );
921- }
922- }
923875}
924876
925877namespace NSchemeShardUT_Private {
0 commit comments