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

Function addInstanceSnapshotConfig

internal/server/db/snapshots_test.go:210–218  ·  view source on GitHub ↗
(t *testing.T, tx *db.ClusterTx, instance, name, key, value string)

Source from the content-addressed store, hash-verified

208}
209
210func addInstanceSnapshotConfig(t *testing.T, tx *db.ClusterTx, instance, name, key, value string) {
211 id := getInstanceSnapshotID(t, tx, instance, name)
212
213 stmt := `
214INSERT INTO instances_snapshots_config(instance_snapshot_id, key, value) VALUES (?, ?, ?)
215`
216 _, err := tx.Tx().Exec(stmt, id, key, value)
217 require.NoError(t, err)
218}
219
220// Return the instance snapshot device ID given its instance snapshot ID and name.
221func getInstanceSnapshotDeviceID(t *testing.T, tx *db.ClusterTx, instanceSnapshotID int64, name string) int64 {

Callers 1

TestGetInstanceSnapshotsFunction · 0.85

Calls 3

getInstanceSnapshotIDFunction · 0.85
TxMethod · 0.80
ExecMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…