MCPcopy Index your code
hub / github.com/coder/coder / TestReadModifyUpdate_OK

Function TestReadModifyUpdate_OK

coderd/database/tx_test.go:16–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestReadModifyUpdate_OK(t *testing.T) {
17 t.Parallel()
18
19 mDB := dbmock.NewMockStore(gomock.NewController(t))
20
21 mDB.EXPECT().
22 InTx(gomock.Any(), &database.TxOptions{Isolation: sql.LevelRepeatableRead}).
23 Times(1).
24 Return(nil)
25 err := database.ReadModifyUpdate(mDB, func(tx database.Store) error {
26 return nil
27 })
28 require.NoError(t, err)
29}
30
31func TestReadModifyUpdate_RetryOK(t *testing.T) {
32 t.Parallel()

Callers

nothing calls this directly

Calls 4

EXPECTMethod · 0.95
NewMockStoreFunction · 0.92
ReadModifyUpdateFunction · 0.92
InTxMethod · 0.65

Tested by

no test coverage detected