mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 19:49:08 +08:00
require added
This commit is contained in:
parent
f7330892f1
commit
c45ad60078
@ -1,20 +1,19 @@
|
|||||||
import {getIDTokenUrl} from './../src/internal/config-variables'
|
var httpclient = require("@actions/http-client")
|
||||||
import {HttpClient} from '@actions/http-client'
|
var configvar = require("./../src/internal/config-variables")
|
||||||
|
|
||||||
|
describe('oidc-client-tests', () => {
|
||||||
|
it('Get Http Client', async () => {
|
||||||
|
//const http = new httpclient('actions/oidc-client')
|
||||||
|
expect(httpclient).toBeDefined()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Get token endpoint', async () => {
|
||||||
|
let url = await configvar.getIDTokenUrl()
|
||||||
|
expect(url).toBeDefined()
|
||||||
|
})
|
||||||
|
|
||||||
test('Get httpclient', () => {
|
|
||||||
const http = new HttpClient('actions/oidc-client')
|
|
||||||
expect(http).toBeDefined()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('HTTP get request to get token endpoint', async () => {
|
/*test('HTTP get request to get token endpoint', async () => {
|
||||||
const http = new HttpClient('actions/oidc-client')
|
expect(1).toBe(1)
|
||||||
const 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; url = getIDTokenUrl()
|
|
||||||
expect(url).toBeDefined()
|
|
||||||
})
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user