mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-15 15:38:05 +08:00
Resolved Comments
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
var httpclient = require('@actions/http-client')
|
||||
var configvar = require('./../src/internal/config-variables')
|
||||
var main = require('./../src/main')
|
||||
|
||||
function getTokenEndPoint() {
|
||||
return 'https://vstoken.actions.githubusercontent.com/.well-known/openid-configuration'
|
||||
}
|
||||
|
||||
describe('oidc-client-tests', () => {
|
||||
it('Get Http Client', async () => {
|
||||
@@ -10,23 +12,7 @@ describe('oidc-client-tests', () => {
|
||||
|
||||
it('HTTP get request to get token endpoint', async () => {
|
||||
const http = new httpclient.HttpClient('actions/oidc-client')
|
||||
const res = await http.get(
|
||||
'https://ghactionsoidc.azurewebsites.net/.well-known/openid-configuration'
|
||||
)
|
||||
const res = await http.get(getTokenEndPoint())
|
||||
expect(res.message.statusCode).toBe(200)
|
||||
})
|
||||
|
||||
it('Get token endpoint', async () => {
|
||||
let url = await configvar.getIDTokenUrl()
|
||||
expect(url).toBeDefined()
|
||||
})
|
||||
|
||||
it('Fetch Id token', async () => {
|
||||
var id_token = main.getIDToken('helloworld')
|
||||
expect(id_token).toBeDefined()
|
||||
})
|
||||
})
|
||||
|
||||
/*test('HTTP get request to get token endpoint', async () => {
|
||||
expect(1).toBe(1)
|
||||
})*/
|
||||
|
||||
Reference in New Issue
Block a user