@@ -949,33 +949,33 @@ def test_motherduck_token_mask(make_config):
949949 assert config_1 ._mask_sensitive_data (config_1 .database ) == "whodunnit"
950950 assert (
951951 config_1 ._mask_sensitive_data (f"md:{ config_1 .database } ?motherduck_token={ config_1 .token } " )
952- == "md:whodunnit?motherduck_token=*****"
952+ == "md:whodunnit?motherduck_token=******** "
953953 )
954954 assert (
955955 config_1 ._mask_sensitive_data (
956956 f"md:{ config_1 .database } ?attach_mode=single&motherduck_token={ config_1 .token } "
957957 )
958- == "md:whodunnit?attach_mode=single&motherduck_token=*****"
958+ == "md:whodunnit?attach_mode=single&motherduck_token=******** "
959959 )
960960 assert (
961961 config_2 ._mask_sensitive_data (f"md:{ config_2 .database } ?motherduck_token={ config_2 .token } " )
962- == "md:whodunnit?motherduck_token=****************** "
962+ == "md:whodunnit?motherduck_token=********"
963963 )
964964 assert (
965965 config_3 ._mask_sensitive_data (f"md:?motherduck_token={ config_3 .token } " )
966- == "md:?motherduck_token=********** "
966+ == "md:?motherduck_token=********"
967967 )
968968 assert (
969969 config_1 ._mask_sensitive_data ("?motherduck_token=secret1235" )
970- == "?motherduck_token=********** "
970+ == "?motherduck_token=********"
971971 )
972972 assert (
973973 config_1 ._mask_sensitive_data ("md:whodunnit?motherduck_token=short" )
974- == "md:whodunnit?motherduck_token=*****"
974+ == "md:whodunnit?motherduck_token=******** "
975975 )
976976 assert (
977977 config_1 ._mask_sensitive_data ("md:whodunnit?motherduck_token=longtoken123456789" )
978- == "md:whodunnit?motherduck_token=****************** "
978+ == "md:whodunnit?motherduck_token=********"
979979 )
980980 assert (
981981 config_1 ._mask_sensitive_data ("md:whodunnit?motherduck_token=" )
@@ -988,25 +988,25 @@ def test_motherduck_token_mask(make_config):
988988 config_1 ._mask_sensitive_data (
989989 "postgres:dbname=mydb user=myuser password=secret123 host=localhost"
990990 )
991- == "postgres:dbname=mydb user=myuser password=********* host=localhost"
991+ == "postgres:dbname=mydb user=myuser password=******** host=localhost"
992992 )
993993
994994 assert (
995995 config_1 ._mask_sensitive_data (
996996 "dbname=postgres user=postgres password=pg_secret host=127.0.0.1"
997997 )
998- == "dbname=postgres user=postgres password=********* host=127.0.0.1"
998+ == "dbname=postgres user=postgres password=******** host=127.0.0.1"
999999 )
10001000 assert (
10011001 config_1 ._mask_sensitive_data (
10021002 "postgres:dbname=testdb password=verylongpassword123 user=admin"
10031003 )
1004- == "postgres:dbname=testdb password=******************* user=admin"
1004+ == "postgres:dbname=testdb password=******** user=admin"
10051005 )
1006- assert config_1 ._mask_sensitive_data ("postgres:password=short" ) == "postgres:password=*****"
1006+ assert config_1 ._mask_sensitive_data ("postgres:password=short" ) == "postgres:password=******** "
10071007 assert (
10081008 config_1 ._mask_sensitive_data ("postgres:host=localhost password=p@ssw0rd! dbname=db" )
1009- == "postgres:host=localhost password=********* dbname=db"
1009+ == "postgres:host=localhost password=******** dbname=db"
10101010 )
10111011
10121012 assert (
@@ -1016,7 +1016,7 @@ def test_motherduck_token_mask(make_config):
10161016
10171017 assert (
10181018 config_1 ._mask_sensitive_data ("md:db?motherduck_token=token123 postgres:password=secret" )
1019- == "md:db?motherduck_token=******** postgres:password=******"
1019+ == "md:db?motherduck_token=******** postgres:password=******** "
10201020 )
10211021
10221022 # MySQL format
0 commit comments