diff --git a/packages/db/src/core/integration/index.ts b/packages/db/src/core/integration/index.ts index e383fc184f..bcaf59bb25 100644 --- a/packages/db/src/core/integration/index.ts +++ b/packages/db/src/core/integration/index.ts @@ -43,7 +43,7 @@ function astroDBIntegration(): AstroIntegration { } let dbPlugin: VitePlugin; - if (studio && command === 'build') { + if (studio && command === 'build' && process.env.ASTRO_DB_TEST_ENV !== '1') { appToken = await getManagedAppTokenOrExit(); connectedToRemote = true; dbPlugin = vitePluginDb({ diff --git a/packages/db/test/basics.test.js b/packages/db/test/basics.test.js index b1b49591c4..2c79c0b9cd 100644 --- a/packages/db/test/basics.test.js +++ b/packages/db/test/basics.test.js @@ -3,6 +3,10 @@ import { load as cheerioLoad } from 'cheerio'; import { loadFixture } from '../../astro/test/test-utils.js'; import testAdapter from '../../astro/test/test-adapter.js'; +// TODO(fks): Rename this to something more generic/generally useful +// like `ASTRO_MONOREPO_TEST_ENV` if @astrojs/db is merged into astro. +process.env.ASTRO_DB_TEST_ENV = '1'; + describe('astro:db', () => { let fixture; before(async () => {