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

fix: save data in /snapshot instead of /snapshots. #56

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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