Fixed test for session id changes

This commit is contained in:
Hein 2025-12-09 14:07:00 +02:00
parent a4dd2a7086
commit dc3b621380

View File

@ -784,7 +784,8 @@ func TestReplaceMetaVariables(t *testing.T) {
userCtx := &security.UserContext{
UserID: 123,
UserName: "testuser",
SessionID: "456",
SessionID: "ABC456",
SessionRID: 456,
}
metainfo := map[string]interface{}{
@ -821,6 +822,12 @@ func TestReplaceMetaVariables(t *testing.T) {
expectedCheck: func(result string) bool {
return strings.Contains(result, "456")
},
}, {
name: "Replace [id_session]",
sqlQuery: "SELECT * FROM sessions WHERE session_id = [id_session]",
expectedCheck: func(result string) bool {
return strings.Contains(result, "ABC456")
},
},
}