File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { FlagdContainer } from '../tests/flagdContainer';
44import type { State , Steps } from './state' ;
55import { FlagdProvider } from '../../lib/flagd-provider' ;
66import type { FlagdProviderOptions } from '../../lib/configuration' ;
7+ import { getGherkinTestPath } from '@openfeature/flagd-core' ;
78import { resolve } from 'node:path' ;
89import { existsSync } from 'node:fs' ;
910
@@ -48,10 +49,7 @@ export const providerSteps: Steps =
4849 case 'ssl' : {
4950 flagdOptions [ 'port' ] = container . getPort ( state . resolverType ) ;
5051 flagdOptions [ 'tls' ] = true ;
51- const certPath = resolve (
52- __dirname ,
53- './../../../../../shared/flagd-core/test-harness/ssl/custom-root-cert.crt' ,
54- ) ;
52+ const certPath = resolve ( getGherkinTestPath ( 'custom-root-cert.crt' , 'test-harness/ssl/' ) ) ;
5553 flagdOptions [ 'certPath' ] = certPath ;
5654 if ( ! existsSync ( certPath ) ) {
5755 throw new Error ( 'Certificate file not found at path: ' + certPath ) ;
Original file line number Diff line number Diff line change 11import { credentials } from '@grpc/grpc-js' ;
2- import type { ClientReadableStream } from '@grpc/grpc-js' ;
2+ import type { ClientReadableStream , ChannelCredentials } from '@grpc/grpc-js' ;
33import { readFileSync , existsSync } from 'node:fs' ;
44
55export const closeStreamIfDefined = ( stream : ClientReadableStream < unknown > | undefined ) => {
@@ -21,7 +21,7 @@ export const closeStreamIfDefined = (stream: ClientReadableStream<unknown> | und
2121 * Creates gRPC channel credentials based on TLS and certificate path configuration.
2222 * @returns Channel credentials for gRPC connection
2323 */
24- export const createChannelCredentials = ( tls : boolean , certPath ?: string ) => {
24+ export const createChannelCredentials = ( tls : boolean , certPath ?: string ) : ChannelCredentials => {
2525 if ( ! tls ) {
2626 return credentials . createInsecure ( ) ;
2727 }
You can’t perform that action at this time.
0 commit comments