MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / assertRestoreSQLiteValue

Function assertRestoreSQLiteValue

cmd/pad/cmd_db_restore_test.go:159–170  ·  view source on GitHub ↗
(t *testing.T, path, want string)

Source from the content-addressed store, hash-verified

157}
158
159func assertRestoreSQLiteValue(t *testing.T, path, want string) {
160 t.Helper()
161 db := openRestoreSQLiteCopy(t, path)
162 defer db.Close()
163 var got string
164 if err := db.QueryRow("SELECT value FROM recovery_probe").Scan(&got); err != nil {
165 t.Fatal(err)
166 }
167 if got != want {
168 t.Errorf("committed value=%q, want %q", got, want)
169 }
170}
171
172func executeSQLiteRestore(t *testing.T, backup string) error {
173 t.Helper()

Calls 6

openRestoreSQLiteCopyFunction · 0.85
HelperMethod · 0.80
FatalMethod · 0.80
CloseMethod · 0.65
ScanMethod · 0.65
QueryRowMethod · 0.65

Tested by

no test coverage detected