diff options
Diffstat (limited to 'packages/db/test')
-rw-r--r-- | packages/db/test/basics.test.js | 11 | ||||
-rw-r--r-- | packages/db/test/fixtures/ticketing-example/db/config.ts | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/packages/db/test/basics.test.js b/packages/db/test/basics.test.js index 19c105532..55a5f0ec6 100644 --- a/packages/db/test/basics.test.js +++ b/packages/db/test/basics.test.js @@ -13,21 +13,20 @@ describe('astro:db', () => { }); }); - // Note(bholmesdev): Use in-memory db to avoid - // Multiple dev servers trying to unlink and remount - // the same database file. - process.env.TEST_IN_MEMORY_DB = 'true'; + // Note (@bholmesdev) generate a random database id on startup. + // Ensures database connections don't conflict + // when multiple dev servers are run in parallel on the same project. + process.env.ASTRO_TEST_RANDOM_DB_ID = 'true'; describe('development', () => { let devServer; before(async () => { - console.log('starting dev server'); devServer = await fixture.startDevServer(); }); after(async () => { await devServer.stop(); - process.env.TEST_IN_MEMORY_DB = undefined; + process.env.ASTRO_TEST_RANDOM_DB_ID = undefined; }); it('Prints the list of authors', async () => { diff --git a/packages/db/test/fixtures/ticketing-example/db/config.ts b/packages/db/test/fixtures/ticketing-example/db/config.ts index 09ed4d273..f8148eaed 100644 --- a/packages/db/test/fixtures/ticketing-example/db/config.ts +++ b/packages/db/test/fixtures/ticketing-example/db/config.ts @@ -10,8 +10,6 @@ const Event = defineTable({ ticketPrice: column.number(), date: column.date(), location: column.text(), - author3: column.text(), - author4: column.text(), }, }); |