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

Commit

Permalink
fix: save data in /snapshot instead of /snapshots. (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
mctavish authored Aug 10, 2022
1 parent c891b1a commit d241439
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/googleclouddebugger/firebase_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def _TransmitBreakpointUpdates(self):
if is_snapshot:
# Note that there may not be snapshot data.
bp_ref = firebase_admin.db.reference(
f'cdbg/breakpoints/{self._debuggee_id}/snapshots/{bp_id}')
f'cdbg/breakpoints/{self._debuggee_id}/snapshot/{bp_id}')
bp_ref.set(breakpoint_data)

# Now strip potential snapshot data.
Expand Down
6 changes: 3 additions & 3 deletions tests/firebase_client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def testEnqueueBreakpointUpdate(self):
call(f'cdbg/breakpoints/{debuggee_id}/active/{breakpoint_id}'),
db_ref_calls[2])
self.assertEqual(
call(f'cdbg/breakpoints/{debuggee_id}/snapshots/{breakpoint_id}'),
call(f'cdbg/breakpoints/{debuggee_id}/snapshot/{breakpoint_id}'),
db_ref_calls[3])
self.assertEqual(
call(f'cdbg/breakpoints/{debuggee_id}/final/{breakpoint_id}'),
Expand Down Expand Up @@ -381,9 +381,9 @@ def testEnqueueBreakpointUpdateWithLogpoint(self):
active_ref_mock.delete.assert_called_once()
final_ref_mock.set.assert_called_once_with(output_breakpoint)

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

def testEnqueueBreakpointUpdateRetry(self):
Expand Down

0 comments on commit d241439

Please sign in to comment.