mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-05-02 11:48:05 +08:00
Resolved issues
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
var httpclient = require("@actions/http-client")
|
||||
var configvar = require("./../src/internal/config-variables")
|
||||
var httpclient = require('@actions/http-client')
|
||||
var configvar = require('./../src/internal/config-variables')
|
||||
var main = require('./../src/main')
|
||||
|
||||
describe('oidc-client-tests', () => {
|
||||
it('Get Http Client', async () => {
|
||||
//const http = new httpclient('actions/oidc-client')
|
||||
expect(httpclient).toBeDefined()
|
||||
const http = new httpclient.HttpClient('actions/oidc-client')
|
||||
expect(http).toBeDefined()
|
||||
})
|
||||
|
||||
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'
|
||||
)
|
||||
expect(res.message.statusCode).toBe(200)
|
||||
})
|
||||
|
||||
it('Get token endpoint', async () => {
|
||||
@@ -12,6 +21,10 @@ describe('oidc-client-tests', () => {
|
||||
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 () => {
|
||||
|
||||
Reference in New Issue
Block a user