1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-09 13:30:04 +00:00

chore: removed httpsAgent type + clean up

This commit is contained in:
Saad Jutt
2021-10-07 13:45:50 +05:00
parent 2849e6ed07
commit 6ff8eece7b
11 changed files with 46 additions and 143 deletions

View File

@@ -5,12 +5,6 @@ import { app, mockedAuthResponse } from './SAS_server_app'
import { ServerType } from '@sasjs/utils'
import SASjs from '../SASjs'
import * as axiosModules from '../utils/createAxiosInstance'
import {
clientCert,
createCertificates,
rootCaCert,
serverCert
} from './serverUtils'
const axiosActual = jest.requireActual('axios')
@@ -84,9 +78,7 @@ describe('RequestClient - Self Signed Server', () => {
adapter = new SASjs({
serverUrl: SERVER_URL,
serverType: ServerType.SasViya,
httpsAgentConfiguration: {
selfSigned: { ca: [sslConfig.certificate] }
}
httpsAgentOptions: { ca: [sslConfig.certificate] }
})
})
@@ -115,9 +107,7 @@ describe('RequestClient - Self Signed Server', () => {
const adapterAllowInsecure = new SASjs({
serverUrl: SERVER_URL,
serverType: ServerType.SasViya,
httpsAgentConfiguration: {
allowInsecure: true
}
httpsAgentOptions: { rejectUnauthorized: false }
})
const authResponse = await adapterAllowInsecure.getAccessToken(