@@ -2,6 +2,8 @@ import { randomUUID } from 'node:crypto';
22import { GenericContainer , StartedTestContainer , Wait } from 'testcontainers' ;
33import { ApiResponse , AuthToken , Authorizer } from '../lib' ;
44
5+ jest . setTimeout ( 900000 ) ; // Integration tests can be slow on CI
6+
57const authorizerConfig : {
68 authorizerURL : string ;
79 redirectURL : string ;
@@ -49,8 +51,7 @@ function buildAuthorizerCliArgs(): { args: string[]; clientId: string } {
4951 '/tmp/authorizer.db' ,
5052 '--custom-access-token-script' ,
5153 customAccessTokenScript ,
52- '--enable-playground' ,
53- 'false' ,
54+ '--enable-playground=false' ,
5455 '--log-level' ,
5556 'debug' ,
5657 '--smtp-host' ,
@@ -63,10 +64,8 @@ function buildAuthorizerCliArgs(): { args: string[]; clientId: string } {
6364 'WncNxwVFqb6nBjKDQJ' ,
6465 '--smtp-sender-email' ,
6566 'test@authorizer.dev' ,
66- '--enable-email-verification' ,
67- 'true' ,
68- '--enable-magic-link-login' ,
69- 'true' ,
67+ '--enable-email-verification=true' ,
68+ '--enable-magic-link-login=true' ,
7069 ] ;
7170 return { args, clientId } ;
7271}
@@ -88,7 +87,7 @@ describe('Integration Tests - authorizer-js', () => {
8887 . withCommand ( args )
8988 . withExposedPorts ( 8080 )
9089 . withWaitStrategy ( Wait . forHttp ( '/health' , 8080 ) . forStatusCode ( 200 ) )
91- . withStartupTimeout ( 6000000 ) // 10 minutes
90+ . withStartupTimeout ( 300000 ) // 5 minutes
9291 . start ( ) ;
9392
9493 authorizerConfig . authorizerURL = `http://${ container . getHost ( ) } :${ container . getMappedPort (
@@ -100,9 +99,6 @@ describe('Integration Tests - authorizer-js', () => {
10099 authorizerConfig . clientID = clientId ;
101100 console . log ( 'Authorizer URL:' , authorizerConfig . authorizerURL ) ;
102101 authorizer = new Authorizer ( authorizerConfig ) ;
103- const metadataRes = await authorizer . getMetaData ( ) ;
104- expect ( metadataRes ?. data ) . toBeDefined ( ) ;
105- expect ( metadataRes ?. data ?. client_id ) . toBe ( clientId ) ;
106102 } ) ;
107103
108104 afterAll ( async ( ) => {
0 commit comments