MCPcopy Create free account
hub / github.com/ElementsProject/lightning / tmp_dsn

Function tmp_dsn

plugins/bkpr/test/run-bkpr_db.c:234–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232/* AUTOGENERATED MOCKS END */
233
234static char *tmp_dsn(const tal_t *ctx)
235{
236 char *dsn, *filename;
237 int fd = tmpdir_mkstemp(ctx, "lacct-db-XXXXXX", &filename);
238 if (fd == -1)
239 return NULL;
240 close(fd);
241
242 dsn = tal_fmt(NULL, "sqlite3://%s", filename);
243 tal_free(filename);
244
245 return dsn;
246}
247
248static struct db *create_test_db(void)
249{

Callers 1

create_test_dbFunction · 0.70

Calls 2

tmpdir_mkstempFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected