question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rules simulator does not support multi-location updates.

See original GitHub issue

There is no way to write a test for a multi-location update in the simulator since all writes are to an atomic location and sequential.

Expect a way to test a multi-location write scenario.

A couple ideas of ways to implement this:

  • With no change to API - but treat successive writes (between succeeds or fails statements) as a multi-location update.
  • Add a .update({"path-1": <value-1>, "path-2": <value-2>); API.
  • Add explicit grouping command around multi-location updates:
.beginUpdate()
  .at(<path>)
  .write(<data>)
  .at(<path>)
  .write(<data>)
.endUpdate()
.succeeds(<reason>)

I’m leaning to the last approach as being most consistent with the current testing API.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
janvogtcommented, Nov 28, 2016

+1

1reaction
realappiecommented, Oct 21, 2016

I really need this as well, any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simulator shows no error in Firebase, but the permission is ...
But the .validate rule is rejecting the write, because it's checking for a string (and you're posting a JSON object).
Read more >
Multi-location Synthetic monitoring alert conditions
Synthetic monitoring multi-location alert conditions allow you to specify how many location checks must fail before generating a notification.
Read more >
Multi-Location Emulation of a Process-Based Salinity Model ...
2.2. Study Model and Dataset. This study aims to emulate DSM2 in modeling salinity in the Delta. DSM2 is a process-based hydrodynamic and...
Read more >
Multi Location Expansion | Remote Working Solutions - MetTel
Multi location businesses can be challenging. The solution is MetTel's seamless centralized comms managed network. Read our use cases to find out more....
Read more >
SEC Interpretive Release: Commission Guidance Regarding ...
To allow appropriate flexibility, the guidance does not provide a checklist of steps management should perform in completing its evaluation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found