mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 07:35:10 +00:00
Additional test for full install of generic
This commit is contained in:
parent
b0977357bf
commit
30a99eea90
@ -59,6 +59,19 @@ describe('installer tests', () => {
|
||||
fs.unlinkSync(globalJsonPath);
|
||||
}, 100000);
|
||||
|
||||
it('Acquires generic version of dotnet if no matching version is installed', async () => {
|
||||
await getDotnet('3.1');
|
||||
var directory = fs
|
||||
.readdirSync(path.join('/usr/local/share/dotnet/', 'sdk'))
|
||||
.filter(fn => fn.startsWith('3.1.'));
|
||||
expect(directory.length > 0).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);
|
||||
}
|
||||
}, 400000); //This needs some time to download on "slower" internet connections
|
||||
|
||||
it('Throws if no location contains correct dotnet version', async () => {
|
||||
let thrown = false;
|
||||
try {
|
||||
|
@ -251,8 +251,6 @@ export class DotnetCoreInstaller {
|
||||
const result = response.result || {};
|
||||
let releasesInfo: any[] = result['releases-index'];
|
||||
|
||||
console.log(versionParts);
|
||||
|
||||
releasesInfo = releasesInfo.filter((info: any) => {
|
||||
// channel-version is the first 2 elements of the version (e.g. 2.1), filter out versions that don't match 2.1.x.
|
||||
const sdkParts: string[] = info['channel-version'].split('.');
|
||||
|
Loading…
x
Reference in New Issue
Block a user