mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-04-06 07:19:55 +00:00
follow proxy settings
This commit is contained in:
@ -2,7 +2,7 @@ import io = require('@actions/io');
|
||||
import fs = require('fs');
|
||||
import os = require('os');
|
||||
import path = require('path');
|
||||
import httpClient = require('typed-rest-client/HttpClient');
|
||||
import hc = require('@actions/http-client');
|
||||
|
||||
const toolDir = path.join(__dirname, 'runner', 'tools');
|
||||
const tempDir = path.join(__dirname, 'runner', 'temp');
|
||||
@ -74,14 +74,14 @@ describe('installer tests', () => {
|
||||
});
|
||||
|
||||
it('Uses an up to date bash download script', async () => {
|
||||
var httpCallbackClient = new httpClient.HttpClient(
|
||||
'setup-dotnet-test',
|
||||
[],
|
||||
{}
|
||||
);
|
||||
const response: httpClient.HttpClientResponse = await httpCallbackClient.get(
|
||||
const httpCallbackClient = new hc.HttpClient('setup-dotnet-test', [], {
|
||||
allowRetries: true,
|
||||
maxRetries: 3
|
||||
});
|
||||
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
||||
'https://dot.net/v1/dotnet-install.sh'
|
||||
);
|
||||
expect(response.message.statusCode).toBe(200);
|
||||
const upToDateContents: string = await response.readBody();
|
||||
const currentContents: string = fs
|
||||
.readFileSync(
|
||||
@ -94,14 +94,14 @@ describe('installer tests', () => {
|
||||
}, 100000);
|
||||
|
||||
it('Uses an up to date powershell download script', async () => {
|
||||
var httpCallbackClient = new httpClient.HttpClient(
|
||||
'setup-dotnet-test',
|
||||
[],
|
||||
{}
|
||||
);
|
||||
const response: httpClient.HttpClientResponse = await httpCallbackClient.get(
|
||||
var httpCallbackClient = new hc.HttpClient('setup-dotnet-test', [], {
|
||||
allowRetries: true,
|
||||
maxRetries: 3
|
||||
});
|
||||
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
||||
'https://dot.net/v1/dotnet-install.ps1'
|
||||
);
|
||||
expect(response.message.statusCode).toBe(200);
|
||||
const upToDateContents: string = await response.readBody();
|
||||
const currentContents: string = fs
|
||||
.readFileSync(
|
||||
|
Reference in New Issue
Block a user