Update test name and timeout

This commit is contained in:
Zachary Eisinger 2020-09-22 10:17:07 -07:00
parent f352e60b67
commit 6643115948
2 changed files with 2 additions and 21 deletions

View File

@ -9,7 +9,6 @@ const tempDir = path.join(__dirname, 'runner', 'temp');
process.env['RUNNER_TOOL_CACHE'] = toolDir;
process.env['RUNNER_TEMP'] = tempDir;
import * as setup from '../src/setup-dotnet';
import * as installer from '../src/installer';
const IS_WINDOWS = process.platform === 'win32';
@ -42,23 +41,6 @@ describe('installer tests', () => {
}
}, 400000); //This needs some time to download on "slower" internet connections
it('Acquires version of dotnet from global.json if no matching version is installed', async () => {
const globalJsonPath = path.join(process.cwd(), 'global.json');
const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "3.1.201"${os.EOL}}${os.EOL}}`;
if (!fs.existsSync(globalJsonPath)) {
fs.writeFileSync(globalJsonPath, jsonContents);
}
await setup.run();
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.201'))).toBe(true);
if (IS_WINDOWS) {
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
} else {
expect(fs.existsSync(path.join(toolDir, 'dotnet'))).toBe(true);
}
fs.unlinkSync(globalJsonPath);
}, 100000);
it('Acquires generic version of dotnet if no matching version is installed', async () => {
await getDotnet('3.1');
var directory = fs

View File

@ -29,7 +29,7 @@ describe('setup-dotnet tests', () => {
}
}, 30000);
it('Acquires version of dotnet if no matching version is installed', async () => {
it('Acquires version of dotnet from global.json if no matching version is installed', async () => {
const globalJsonPath = path.join(process.cwd(), 'global.json');
const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "3.1.201"${os.EOL}}${os.EOL}}`;
if (!fs.existsSync(globalJsonPath)) {
@ -43,6 +43,5 @@ describe('setup-dotnet tests', () => {
} else {
expect(fs.existsSync(path.join(toolDir, 'dotnet'))).toBe(true);
}
fs.unlinkSync(globalJsonPath);
}, 100000);
}, 400000);
});