mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-07 12:33:17 +08:00
Inital draft of OIDC Client
This commit is contained in:
20
packages/oidc-client/__tests__/main.test.ts
Normal file
20
packages/oidc-client/__tests__/main.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import * as get from '../src/main'
|
||||
import {HttpClient} from '@actions/http-client'
|
||||
|
||||
test('Get httpclient', () => {
|
||||
let http: HttpClient = new HttpClient('actions/oidc-client')
|
||||
expect(http).toBeDefined()
|
||||
})
|
||||
|
||||
test('HTTP get request to get token endpoint', async () => {
|
||||
let http: HttpClient = new HttpClient('actions/oidc-client')
|
||||
let res = await http.get(
|
||||
'https://ghactionsoidc.azurewebsites.net/.well-known/openid-configuration'
|
||||
)
|
||||
expect(res.message.statusCode).toBe(200)
|
||||
})
|
||||
|
||||
test('Get token endpoint', async () => {
|
||||
let url: string = await get.getTokenEndPoint()
|
||||
expect(url).toBeDefined()
|
||||
})
|
||||
Reference in New Issue
Block a user