1
0
Fork 0
pull/1508/head
Tatyana Kostromskaya 2023-08-29 10:43:51 +00:00
parent 0956e634df
commit e3b0601228
2 changed files with 12 additions and 2 deletions

View File

@ -670,7 +670,12 @@ describe('oidc-client-tests', () => {
it('HTTP get request to get token endpoint', async () => { it('HTTP get request to get token endpoint', async () => {
const http = new HttpClient('actions/oidc-client') const http = new HttpClient('actions/oidc-client')
const res = await http.get(getTokenEndPoint()) try {
expect(res.message.statusCode).toBe(200) const res = await http.get(getTokenEndPoint())
expect(res.message.statusCode).toBe(200)
}
finally {
http.dispose()
}
}) })
}) })

View File

@ -59,6 +59,7 @@ describe('auth', () => {
const http: httpm.HttpClient = new httpm.HttpClient('http-client-tests', [ const http: httpm.HttpClient = new httpm.HttpClient('http-client-tests', [
ph ph
]) ])
try {
const res: httpm.HttpClientResponse = await http.get( const res: httpm.HttpClientResponse = await http.get(
'http://postman-echo.com/get' 'http://postman-echo.com/get'
) )
@ -68,5 +69,9 @@ describe('auth', () => {
const auth: string = obj.headers.authorization const auth: string = obj.headers.authorization
expect(auth).toBe(`Bearer ${token}`) expect(auth).toBe(`Bearer ${token}`)
expect(obj.url).toBe('http://postman-echo.com/get') expect(obj.url).toBe('http://postman-echo.com/get')
}
finally {
http.dispose()
}
}) })
}) })