File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ export const createStInstanceForTest = async () => {
11
11
docker_image_name : process . env . SUPERTOKENS_DOCKER_IMAGE || "supertokens/supertokens-postgresql"
12
12
} )
13
13
} ) ;
14
-
14
+
15
15
if ( ! response . ok ) {
16
16
throw new Error ( `HTTP error! Status: ${ response . status } ` ) ;
17
17
}
18
-
18
+
19
19
const data : any = await response . json ( ) ;
20
20
21
21
const coreUrl = data . deployment . core_url ;
@@ -24,16 +24,16 @@ export const createStInstanceForTest = async () => {
24
24
let attempts = 0 ;
25
25
const maxAttempts = 30 ;
26
26
const retryDelay = 2000 ;
27
-
27
+
28
28
while ( ! isReady && attempts < maxAttempts ) {
29
29
try {
30
- const healthCheck = await fetch ( `${ coreUrl } /health ` , {
30
+ const healthCheck = await fetch ( `${ coreUrl } ` , {
31
31
method : 'GET' ,
32
32
headers : {
33
33
'Accept' : 'application/json'
34
34
}
35
35
} ) ;
36
-
36
+
37
37
if ( healthCheck . ok ) {
38
38
isReady = true ;
39
39
} else {
@@ -45,7 +45,7 @@ export const createStInstanceForTest = async () => {
45
45
await new Promise ( resolve => setTimeout ( resolve , retryDelay ) ) ;
46
46
}
47
47
}
48
-
48
+
49
49
if ( ! isReady ) {
50
50
throw new Error ( `Core URL ${ coreUrl } did not become ready after ${ maxAttempts } attempts` ) ;
51
51
}
@@ -62,7 +62,7 @@ export const deleteStInstance = async (deploymentId: string) => {
62
62
const response = await fetch ( `https://provision.supertokens.sattvik.me/deployments/${ deploymentId } ` , {
63
63
method : 'DELETE'
64
64
} ) ;
65
- } finally { }
65
+ } finally { }
66
66
}
67
67
68
68
export const formatTime = ( ms : number ) : string => {
You can’t perform that action at this time.
0 commit comments