1
0
Fork 0

require added

pull/867/head
Sourav Chanduka 2021-07-20 12:08:25 +05:30
parent f7330892f1
commit c45ad60078
1 changed files with 16 additions and 17 deletions

View File

@ -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")
test('Get httpclient', () => { describe('oidc-client-tests', () => {
const http = new HttpClient('actions/oidc-client') it('Get Http Client', async () => {
expect(http).toBeDefined() //const http = new httpclient('actions/oidc-client')
}) expect(httpclient).toBeDefined()
})
test('HTTP get request to get token endpoint', async () => { it('Get token endpoint', async () => {
const http = new HttpClient('actions/oidc-client') let url = await configvar.getIDTokenUrl()
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() expect(url).toBeDefined()
})
}) })
/*test('HTTP get request to get token endpoint', async () => {
expect(1).toBe(1)
})*/