Resolved Comments

This commit is contained in:
Sourav Chanduka
2021-07-29 12:17:22 +05:30
parent ff90431d27
commit 0c1cb726c3
6 changed files with 96 additions and 98 deletions

View File

@@ -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)
})*/