diff options
Diffstat (limited to 'packages/db/test/unit/remote-info.test.js')
-rw-r--r-- | packages/db/test/unit/remote-info.test.js | 50 |
1 files changed, 3 insertions, 47 deletions
diff --git a/packages/db/test/unit/remote-info.test.js b/packages/db/test/unit/remote-info.test.js index 2c58f28b7..c72d59b4f 100644 --- a/packages/db/test/unit/remote-info.test.js +++ b/packages/db/test/unit/remote-info.test.js @@ -8,6 +8,7 @@ describe('RemoteDatabaseInfo', () => { clearEnvironment(); }); + // TODO: what should be the default url for libsql? test('default remote info', () => { const dbInfo = getRemoteDatabaseInfo(); @@ -17,16 +18,6 @@ describe('RemoteDatabaseInfo', () => { }); }); - test('configured Astro Studio remote', () => { - process.env.ASTRO_STUDIO_REMOTE_DB_URL = 'https://studio.astro.build'; - const dbInfo = getRemoteDatabaseInfo(); - - assert.deepEqual(dbInfo, { - type: 'studio', - url: 'https://studio.astro.build', - }); - }); - test('configured libSQL remote', () => { process.env.ASTRO_DB_REMOTE_URL = 'libsql://libsql.self.hosted'; const dbInfo = getRemoteDatabaseInfo(); @@ -36,24 +27,12 @@ describe('RemoteDatabaseInfo', () => { url: 'libsql://libsql.self.hosted', }); }); - - test('configured both libSQL and Studio remote', () => { - process.env.ASTRO_DB_REMOTE_URL = 'libsql://libsql.self.hosted'; - process.env.ASTRO_STUDIO_REMOTE_DB_URL = 'https://studio.astro.build'; - const dbInfo = getRemoteDatabaseInfo(); - - assert.deepEqual(dbInfo, { - type: 'studio', - url: 'https://studio.astro.build', - }); - }); }); describe('RemoteManagedToken', () => { // Avoid conflicts with other tests beforeEach(() => { clearEnvironment(); - process.env.ASTRO_STUDIO_APP_TOKEN = 'studio token'; process.env.ASTRO_DB_APP_TOKEN = 'db token'; }); after(() => { @@ -68,20 +47,7 @@ describe('RemoteManagedToken', () => { test('token for default remote', async () => { const { token } = await getManagedRemoteToken(); - assert.equal(token, 'studio token'); - }); - - test('given token for configured Astro Studio remote', async () => { - process.env.ASTRO_STUDIO_REMOTE_DB_URL = 'https://studio.astro.build'; - const { token } = await getManagedRemoteToken('given token'); - assert.equal(token, 'given token'); - }); - - test('token for configured Astro Studio remote', async () => { - process.env.ASTRO_STUDIO_REMOTE_DB_URL = 'https://studio.astro.build'; - const { token } = await getManagedRemoteToken(); - - assert.equal(token, 'studio token'); + assert.equal(token, 'db token'); }); test('given token for configured libSQL remote', async () => { @@ -97,18 +63,8 @@ describe('RemoteManagedToken', () => { assert.equal(token, 'db token'); }); - test('token for given Astro Studio remote', async () => { - process.env.ASTRO_DB_REMOTE_URL = 'libsql://libsql.self.hosted'; - const { token } = await getManagedRemoteToken(undefined, { - type: 'studio', - url: 'https://studio.astro.build', - }); - - assert.equal(token, 'studio token'); - }); - test('token for given libSQL remote', async () => { - process.env.ASTRO_STUDIO_REMOTE_URL = 'libsql://libsql.self.hosted'; + process.env.ASTRO_DB_REMOTE_URL = 'libsql://libsql.self.hosted'; const { token } = await getManagedRemoteToken(undefined, { type: 'libsql', url: 'libsql://libsql.self.hosted', |