mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-15 05:05:08 +00:00
Format: Increase amount of retries for Dotnet installation scripts tests
This commit is contained in:
parent
ed16ccab85
commit
6fb866f807
@ -2,12 +2,18 @@ import path from 'path';
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import * as hc from '@actions/http-client';
|
import * as hc from '@actions/http-client';
|
||||||
|
|
||||||
const HTTP_CLIENT_OPTIONS = { allowRetries: true, maxRetries: 10 } as const;
|
const HTTP_CLIENT_OPTIONS = {allowRetries: true, maxRetries: 10} as const;
|
||||||
const TEST_TIMEOUT = 30000;
|
const TEST_TIMEOUT = 30000;
|
||||||
|
|
||||||
describe('Dotnet installation scripts tests', () => {
|
describe('Dotnet installation scripts tests', () => {
|
||||||
it('Uses an up to date bash download script', async () => {
|
it(
|
||||||
const httpCallbackClient = new hc.HttpClient('setup-dotnet-test', [], HTTP_CLIENT_OPTIONS);
|
'Uses an up to date bash download script',
|
||||||
|
async () => {
|
||||||
|
const httpCallbackClient = new hc.HttpClient(
|
||||||
|
'setup-dotnet-test',
|
||||||
|
[],
|
||||||
|
HTTP_CLIENT_OPTIONS
|
||||||
|
);
|
||||||
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
||||||
'https://dot.net/v1/dotnet-install.sh'
|
'https://dot.net/v1/dotnet-install.sh'
|
||||||
);
|
);
|
||||||
@ -21,10 +27,18 @@ describe('Dotnet installation scripts tests', () => {
|
|||||||
expect(normalizeFileContents(currentContents)).toBe(
|
expect(normalizeFileContents(currentContents)).toBe(
|
||||||
normalizeFileContents(upToDateContents)
|
normalizeFileContents(upToDateContents)
|
||||||
);
|
);
|
||||||
}, TEST_TIMEOUT);
|
},
|
||||||
|
TEST_TIMEOUT
|
||||||
|
);
|
||||||
|
|
||||||
it('Uses an up to date powershell download script', async () => {
|
it(
|
||||||
const httpCallbackClient = new hc.HttpClient('setup-dotnet-test', [], HTTP_CLIENT_OPTIONS);
|
'Uses an up to date powershell download script',
|
||||||
|
async () => {
|
||||||
|
const httpCallbackClient = new hc.HttpClient(
|
||||||
|
'setup-dotnet-test',
|
||||||
|
[],
|
||||||
|
HTTP_CLIENT_OPTIONS
|
||||||
|
);
|
||||||
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
||||||
'https://dot.net/v1/dotnet-install.ps1'
|
'https://dot.net/v1/dotnet-install.ps1'
|
||||||
);
|
);
|
||||||
@ -38,7 +52,9 @@ describe('Dotnet installation scripts tests', () => {
|
|||||||
expect(normalizeFileContents(currentContents)).toBe(
|
expect(normalizeFileContents(currentContents)).toBe(
|
||||||
normalizeFileContents(upToDateContents)
|
normalizeFileContents(upToDateContents)
|
||||||
);
|
);
|
||||||
}, TEST_TIMEOUT);
|
},
|
||||||
|
TEST_TIMEOUT
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
function normalizeFileContents(contents: string): string {
|
function normalizeFileContents(contents: string): string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user