diff --git a/README.md b/README.md index 142cb53..c2de94f 100644 --- a/README.md +++ b/README.md @@ -50,9 +50,9 @@ steps: - run: dotnet build ``` -## Installing Runtimes for Multi-Targeting +## Installing additional runtimes -The `dotnet-runtime` input allows you to install .NET runtimes separately from SDKs. This is useful for multi-targeting scenarios where you need one SDK version but multiple runtime versions for testing. +The `dotnet-runtime` input allows you to install .NET runtimes separately from SDKs. This is useful for multi-targeting scenarios where you need one SDK version but multiple runtime versions. When `dotnet-runtime` is specified, both the .NET Runtime (Microsoft.NETCore.App) and the ASP.NET Core Runtime (Microsoft.AspNetCore.App) are installed for each specified version. diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 7a83468..e0fc54a 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -508,70 +508,6 @@ describe('installer tests', () => { ).join(' '); expect(aspnetcoreScriptArguments).toContain(expectedArgument); }); - - it(`should warn if the 'quality' input is set and the supplied version is in A.B.C syntax`, async () => { - const inputVersion = '8.0.402'; - const inputQuality = 'ga' as QualityOptions; - const stdout = `Fictitious dotnet runtime version ${inputVersion} is installed`; - getExecOutputSpy.mockImplementation(() => { - return Promise.resolve({ - exitCode: 0, - stdout: `${stdout}`, - stderr: '' - }); - }); - maxSatisfyingSpy.mockImplementation(() => inputVersion); - - const dotnetInstaller = new installer.DotnetCoreInstaller( - inputVersion, - inputQuality - ); - - await dotnetInstaller.installRuntime(); - - expect(warningSpy).toHaveBeenCalledWith( - `The 'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A, A.x and A.B.Cxx formats where the major tag is higher than 5. You specified: ${inputVersion}. 'dotnet-quality' input is ignored.` - ); - }); - - each(['8', '8.0', '8.0.x', '8.0.*', '8.0.X']).test( - `should supply 'quality' argument to both runtime installation scripts if quality input is set and version (%s) is not in A.B.C syntax`, - async inputVersion => { - const inputQuality = 'ga' as QualityOptions; - const exitCode = 0; - const stdout = `Fictitious dotnet runtime version 8.0.0 is installed`; - getExecOutputSpy.mockImplementation(() => { - return Promise.resolve({ - exitCode: exitCode, - stdout: `${stdout}`, - stderr: '' - }); - }); - maxSatisfyingSpy.mockImplementation(() => inputVersion); - - const dotnetInstaller = new installer.DotnetCoreInstaller( - inputVersion, - inputQuality - ); - - await dotnetInstaller.installRuntime(); - - const expectedArgument = IS_WINDOWS - ? `-Quality ${inputQuality}` - : `--quality ${inputQuality}`; - - // Check both calls contain quality argument - const dotnetScriptArguments = ( - getExecOutputSpy.mock.calls[0][1] as string[] - ).join(' '); - expect(dotnetScriptArguments).toContain(expectedArgument); - - const aspnetcoreScriptArguments = ( - getExecOutputSpy.mock.calls[1][1] as string[] - ).join(' '); - expect(aspnetcoreScriptArguments).toContain(expectedArgument); - } - ); }); });