aboutsummaryrefslogtreecommitdiff
path: root/packages/db/test/unit/remote-info.test.js
diff options
context:
space:
mode:
authorGravatar Florian Lefebvre <contact@florian-lefebvre.dev> 2025-06-05 16:18:32 +0200
committerGravatar Florian Lefebvre <contact@florian-lefebvre.dev> 2025-06-05 16:18:32 +0200
commit61e779486fffd77eed4b95eec0ab5fcf106dd2d5 (patch)
tree85518de42eea4004e4c891676bce52836de06461 /packages/db/test/unit/remote-info.test.js
parent0947a69192ad6820970902c7c951fb0cf31fcf4b (diff)
downloadastro-feat/remove-studio.tar.gz
astro-feat/remove-studio.tar.zst
astro-feat/remove-studio.zip
feat: remove studiofeat/remove-studio
Diffstat (limited to 'packages/db/test/unit/remote-info.test.js')
-rw-r--r--packages/db/test/unit/remote-info.test.js50
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',