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