Skip to content

Commit caf0b5e

Browse files
heiytorgustavosbarreto
authored andcommitted
fix(api): add tenant_id to active_sessions fixture
- Add tenant_id field to active_sessions.json fixture for consistency with devices - Update TestActiveSessionResolve expectation to include TenantID field - Ensures active sessions are properly associated with tenants in tests
1 parent 7810c16 commit caf0b5e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

api/store/mongo/fixtures/active_sessions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"active_sessions": {
33
"650a1c1b3b3bb3a0f8e9bf43": {
44
"last_seen": "2023-01-01T12:00:00.000Z",
5-
"uid": "a3b0431f5df6a7827945d2e34872a5c781452bc36de42f8b1297fd9ecb012f68"
5+
"uid": "a3b0431f5df6a7827945d2e34872a5c781452bc36de42f8b1297fd9ecb012f68",
6+
"tenant_id": "00000000-0000-4000-0000-000000000000"
67
}
78
}
89
}

api/store/mongo/session_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ func TestActiveSessionResolve(t *testing.T) {
591591
activeSession: &models.ActiveSession{
592592
UID: "a3b0431f5df6a7827945d2e34872a5c781452bc36de42f8b1297fd9ecb012f68",
593593
LastSeen: time.Date(2023, 1, 1, 12, 0, 0, 0, time.UTC),
594+
TenantID: "00000000-0000-4000-0000-000000000000",
594595
},
595596
err: nil,
596597
},

0 commit comments

Comments
 (0)