@@ -78,21 +78,51 @@ func TestGetHistoryFileBasedOnMode_GivenPerDatabaseHistory_WhenPathIsEmpty_Expec
7878 c .Assert (result , qt .Equals , expectedPath )
7979}
8080
81- func TestGetHistoryFileBasedOnMode_GivenPerDatabaseHistory_WhenPathIsHttpUrl_ExpectSpecificGlobalHistory (t * testing.T ) {
81+ func TestGetHistoryFileBasedOnMode_GivenPerDatabaseHistory_WhenPathIsHttpUrlWithUser_ExpectSpecificGlobalHistory (t * testing.T ) {
8282 c := qt .New (t )
8383
84- dbPath := "https://username:password@company .turso.io"
85- expectedPath := getExpectedHistoryFullPath ("username:password " )
84+ dbPath := "https://username:password@database-username .turso.io"
85+ expectedPath := getExpectedHistoryFullPath ("database- username.turso.io " )
8686 result := shell .GetHistoryFileBasedOnMode (dbPath , enums .PerDatabaseHistory , historyName )
8787
8888 c .Assert (result , qt .Equals , expectedPath )
8989}
9090
91- func TestGetHistoryFileBasedOnMode_GivenPerDatabaseHistory_WhenPathIsHttpUrlWithoutUser_ExpectSharedGlobalHistory (t * testing.T ) {
91+ func TestGetHistoryFileBasedOnMode_GivenPerDatabaseHistory_WhenPathIsHttpUrlWithoutUser_ExpectSpecificGlobalHistory (t * testing.T ) {
9292 c := qt .New (t )
9393
94- dbPath := "https://company.turso.io"
95- expectedPath := getExpectedHistoryFullPath (historyName )
94+ dbPath := "https://database-username.turso.io"
95+ expectedPath := getExpectedHistoryFullPath ("database-username.turso.io" )
96+ result := shell .GetHistoryFileBasedOnMode (dbPath , enums .PerDatabaseHistory , historyName )
97+
98+ c .Assert (result , qt .Equals , expectedPath )
99+ }
100+
101+ func TestGetHistoryFileBasedOnMode_GivenPerDatabaseHistory_WhenPathIsLibsqlUrl_ExpectSpecificGlobalHistory (t * testing.T ) {
102+ c := qt .New (t )
103+
104+ dbPath := "libsql://database-username.turso.io/?jwt=some_token"
105+ expectedPath := getExpectedHistoryFullPath ("database-username.turso.io" )
106+ result := shell .GetHistoryFileBasedOnMode (dbPath , enums .PerDatabaseHistory , historyName )
107+
108+ c .Assert (result , qt .Equals , expectedPath )
109+ }
110+
111+ func TestGetHistoryFileBasedOnMode_GivenPerDatabaseHistory_WhenPathIsWssUrl_ExpectSpecificGlobalHistory (t * testing.T ) {
112+ c := qt .New (t )
113+
114+ dbPath := "wss://database-username.turso.io/?jwt=some_token"
115+ expectedPath := getExpectedHistoryFullPath ("database-username.turso.io" )
116+ result := shell .GetHistoryFileBasedOnMode (dbPath , enums .PerDatabaseHistory , historyName )
117+
118+ c .Assert (result , qt .Equals , expectedPath )
119+ }
120+
121+ func TestGetHistoryFileBasedOnMode_GivenPerDatabaseHistory_WhenPathIsWsUrl_ExpectSpecificGlobalHistory (t * testing.T ) {
122+ c := qt .New (t )
123+
124+ dbPath := "ws://database-username.turso.io/?jwt=some_token"
125+ expectedPath := getExpectedHistoryFullPath ("database-username.turso.io" )
96126 result := shell .GetHistoryFileBasedOnMode (dbPath , enums .PerDatabaseHistory , historyName )
97127
98128 c .Assert (result , qt .Equals , expectedPath )
0 commit comments