From 8d7195b824415285845d1821f9ba55e9ae75f130 Mon Sep 17 00:00:00 2001 From: Duy Do Date: Fri, 3 Jan 2025 16:50:52 +0700 Subject: [PATCH] test --- @space-operator/client/tests/auth.ts | 6 +++++- crates/integration-tests/src/main.rs | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/@space-operator/client/tests/auth.ts b/@space-operator/client/tests/auth.ts index b1b2c59e..8776f977 100644 --- a/@space-operator/client/tests/auth.ts +++ b/@space-operator/client/tests/auth.ts @@ -14,9 +14,13 @@ dotenv.loadSync({ export: true, }); +const anonKey = Deno.env.get("ANON_KEY"); + +if (!anonKey) throw new Error("no ANON_KEY"); + const c = new client.Client({ host: "http://localhost:8080", - anonKey: Deno.env.get("ANON_KEY"), + anonKey, }); function keypair_from_env() { diff --git a/crates/integration-tests/src/main.rs b/crates/integration-tests/src/main.rs index 5f731fcd..a04e430a 100644 --- a/crates/integration-tests/src/main.rs +++ b/crates/integration-tests/src/main.rs @@ -35,6 +35,7 @@ fn run(sh: &Shell) -> anyhow::Result<()> { sh.change_dir(&meta.workspace_root); sh.change_dir("@space-operator/client"); + println!("ANON_KEY: {:?}", std::env::var("ANON_KEY").ok()); cmd!(sh, "deno -A tests/auth.ts").run()?; Ok(())