16470: Adds ArvadosModel test exposing a bug with audit logs.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Tue, 28 Jul 2020 16:55:50 +0000 (13:55 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Fri, 7 Aug 2020 14:54:35 +0000 (11:54 -0300)
commitf04932adddab98b004c770a650e13d5001207e96
tree4a6013d2dd7f6202b0b3896bb1fb587d8fffac64
parent498ac72a688f3ff44dc143dcbd248e3e8bc7cfe3
16470: Adds ArvadosModel test exposing a bug with audit logs.

When audit logs are enabled, fetching objects from models with serialized
attributes (for example: User or ContainerRequest) return an unpersisted
instance even if reload() is called on it.
This is a problem because from Rails 5.2, lock!() and with_lock() will raise
an exception when called on unpersisted instances.

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>
services/api/test/unit/arvados_model_test.rb