MCPcopy
hub / github.com/lxc/incus / TestDeleteObject_Error

Function TestDeleteObject_Error

internal/server/db/query/objects_test.go:163–169  ·  view source on GitHub ↗

Exercise possible failure modes.

(t *testing.T)

Source from the content-addressed store, hash-verified

161
162// Exercise possible failure modes.
163func TestDeleteObject_Error(t *testing.T) {
164 tx := newTxForObjects(t)
165
166 deleted, err := query.DeleteObject(tx, "foo", 1)
167 assert.False(t, deleted)
168 assert.EqualError(t, err, "no such table: foo")
169}
170
171// If an row was actually deleted, the returned flag is true.
172func TestDeleteObject_Deleted(t *testing.T) {

Callers

nothing calls this directly

Calls 2

DeleteObjectFunction · 0.92
newTxForObjectsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…