Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit d241439

Browse files
authored
fix: save data in /snapshot instead of /snapshots. (#56)
1 parent c891b1a commit d241439

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/googleclouddebugger/firebase_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def _TransmitBreakpointUpdates(self):
456456
if is_snapshot:
457457
# Note that there may not be snapshot data.
458458
bp_ref = firebase_admin.db.reference(
459-
f'cdbg/breakpoints/{self._debuggee_id}/snapshots/{bp_id}')
459+
f'cdbg/breakpoints/{self._debuggee_id}/snapshot/{bp_id}')
460460
bp_ref.set(breakpoint_data)
461461

462462
# Now strip potential snapshot data.

tests/firebase_client_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def testEnqueueBreakpointUpdate(self):
308308
call(f'cdbg/breakpoints/{debuggee_id}/active/{breakpoint_id}'),
309309
db_ref_calls[2])
310310
self.assertEqual(
311-
call(f'cdbg/breakpoints/{debuggee_id}/snapshots/{breakpoint_id}'),
311+
call(f'cdbg/breakpoints/{debuggee_id}/snapshot/{breakpoint_id}'),
312312
db_ref_calls[3])
313313
self.assertEqual(
314314
call(f'cdbg/breakpoints/{debuggee_id}/final/{breakpoint_id}'),
@@ -381,9 +381,9 @@ def testEnqueueBreakpointUpdateWithLogpoint(self):
381381
active_ref_mock.delete.assert_called_once()
382382
final_ref_mock.set.assert_called_once_with(output_breakpoint)
383383

384-
# Make sure that the snapshots node was not accessed.
384+
# Make sure that the snapshot node was not accessed.
385385
self.assertTrue(
386-
call(f'cdbg/breakpoints/{debuggee_id}/snapshots/{breakpoint_id}') not in
386+
call(f'cdbg/breakpoints/{debuggee_id}/snapshot/{breakpoint_id}') not in
387387
db_ref_calls)
388388

389389
def testEnqueueBreakpointUpdateRetry(self):

0 commit comments

Comments
 (0)