@@ -24,7 +24,7 @@ Deno.test({
2424 fn : ( ) => {
2525 const requiredVars = [
2626 "SUPABASE_URL" ,
27- "SUPABASE_SERVICE_ROLE_KEY " ,
27+ "SERVICE_ROLE_KEY " ,
2828 ] ;
2929
3030 const missing : string [ ] = [ ] ;
@@ -194,9 +194,9 @@ Deno.test({
194194} ) ;
195195
196196Deno . test ( {
197- name : "SUPABASE_SERVICE_ROLE_KEY is not empty and has sufficient length" ,
197+ name : "SERVICE_ROLE_KEY is not empty and has sufficient length" ,
198198 fn : ( ) => {
199- const key = Deno . env . get ( "SUPABASE_SERVICE_ROLE_KEY " ) ;
199+ const key = Deno . env . get ( "SERVICE_ROLE_KEY " ) ;
200200
201201 if ( ! key ) {
202202 return ;
@@ -205,7 +205,7 @@ Deno.test({
205205 assertEquals (
206206 key . length > 50 ,
207207 true ,
208- "SUPABASE_SERVICE_ROLE_KEY appears too short"
208+ "SERVICE_ROLE_KEY appears too short"
209209 ) ;
210210 } ,
211211} ) ;
@@ -290,7 +290,7 @@ Deno.test({
290290 fn : ( ) => {
291291 const criticalVars = [
292292 "SUPABASE_URL" ,
293- "SUPABASE_SERVICE_ROLE_KEY " ,
293+ "SERVICE_ROLE_KEY " ,
294294 "WHOOP_CLIENT_ID" ,
295295 "WHOOP_CLIENT_SECRET" ,
296296 "FITBIT_CLIENT_ID" ,
@@ -343,7 +343,7 @@ Deno.test({
343343Deno . test ( {
344344 name : "SECURITY: Service role key is not accidentally exposed as anon key" ,
345345 fn : ( ) => {
346- const serviceRoleKey = Deno . env . get ( "SUPABASE_SERVICE_ROLE_KEY " ) ;
346+ const serviceRoleKey = Deno . env . get ( "SERVICE_ROLE_KEY " ) ;
347347
348348 if ( ! serviceRoleKey ) {
349349 return ;
@@ -354,14 +354,14 @@ Deno.test({
354354 assertEquals (
355355 serviceRoleKey . startsWith ( "eyJ" ) ,
356356 true ,
357- "SUPABASE_SERVICE_ROLE_KEY should be a JWT"
357+ "SERVICE_ROLE_KEY should be a JWT"
358358 ) ;
359359
360360 // Service role key should be significantly long (at least 100 chars)
361361 assertEquals (
362362 serviceRoleKey . length > 100 ,
363363 true ,
364- "SUPABASE_SERVICE_ROLE_KEY appears too short"
364+ "SERVICE_ROLE_KEY appears too short"
365365 ) ;
366366 } ,
367367} ) ;
@@ -376,7 +376,7 @@ Deno.test({
376376 const allRequiredVars = [
377377 // Supabase
378378 "SUPABASE_URL" ,
379- "SUPABASE_SERVICE_ROLE_KEY " ,
379+ "SERVICE_ROLE_KEY " ,
380380 // WHOOP
381381 "WHOOP_CLIENT_ID" ,
382382 "WHOOP_CLIENT_SECRET" ,
0 commit comments