Is your feature request related to a problem? Please describe.
We have a solution that uses three separate tables. Any update to the data should update rows in all, or none of the tables.
Describe the solution you'd like
We would love for spannertest to roll back transactions when there is an error. That way we can keep relying on spannertest for our unit tests in our CI/CD environment.
Describe alternatives you've considered
We have considered running the Cloud Spanner Emulator in our tests, however that will not play nice with our CI/CD setup. It does work when testing locally, which gives us some confidence in our solution, however having the proper support in spannertest would be better.
Yes, the transaction support in spannertest is very skint, and unfortunately unlikely to improve a lot in the near future. There's multiple TODOs in the code.
Is your feature request related to a problem? Please describe. We have a solution that uses three separate tables. Any update to the data should update rows in all, or none of the tables.
We have written code that return the corresponding mutations, and now we want to ensure that CRUD works as intended. On a first glance it seemed like there was transaction support in spannertest: https://github.com/googleapis/google-cloud-go/blob/master/spanner/spannertest/inmem.go#L663-L725
However the rollback does not do anything yet: https://github.com/googleapis/google-cloud-go/blob/92af398bdb5e7536f15945485980dc8736597227/spanner/spannertest/db.go#L143-L148
Describe the solution you'd like We would love for spannertest to roll back transactions when there is an error. That way we can keep relying on spannertest for our unit tests in our CI/CD environment.
Describe alternatives you've considered We have considered running the Cloud Spanner Emulator in our tests, however that will not play nice with our CI/CD setup. It does work when testing locally, which gives us some confidence in our solution, however having the proper support in spannertest would be better.
Additional context