| 232 | /* AUTOGENERATED MOCKS END */ |
| 233 | |
| 234 | static 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 | |
| 248 | static struct db *create_test_db(void) |
| 249 | { |
no test coverage detected