From a22b715bf494fdf9d53544f8d04304910ca10894 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 31 Aug 2018 16:56:56 -0700 Subject: [PATCH] Update published files for 2.2-preview2 (#1370) - Also convert env vars to UPPER_CASE for compat with Mac and Linux --- .vsts/builds/e2e-tests.yml | 7 ++----- test/Cli.FunctionalTests/Cli.FunctionalTests.sln | 5 +++++ .../Templates/RazorApplicationBaseTemplate.cs | 7 +------ .../Templates/WebApiTemplate.cs | 10 ---------- test/Cli.FunctionalTests/Templates/WebTemplate.cs | 14 ++++++++++++++ test/Cli.FunctionalTests/run-tests.ps1 | 8 ++++---- 6 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.vsts/builds/e2e-tests.yml b/.vsts/builds/e2e-tests.yml index d4f237a600..3db5a15233 100644 --- a/.vsts/builds/e2e-tests.yml +++ b/.vsts/builds/e2e-tests.yml @@ -21,7 +21,7 @@ phases: - powershell: | test/Cli.FunctionalTests/run-tests.ps1 ` -ci ` - -ProdConManifestUrl $env:ProdConManifestUrl ` + -ProdConManifestUrl $env:PRODCONMANIFESTURL ` -TestRuntimeIdentifier $(Test.RuntimeIdentifier) condition: ne(variables['PB_SkipTests'], 'true') displayName: Run E2E tests @@ -50,10 +50,7 @@ phases: inputs: versionSpec: 10.x - powershell: | - test/Cli.FunctionalTests/run-tests.ps1 \ - -ci \ - -ProdConManifestUrl $env:ProdConManifestUrl \ - -TestRuntimeIdentifier $(Test.RuntimeIdentifier) + test/Cli.FunctionalTests/run-tests.ps1 -ci -ProdConManifestUrl $env:PRODCONMANIFESTURL -TestRuntimeIdentifier $(Test.RuntimeIdentifier) condition: ne(variables['PB_SkipTests'], 'true') displayName: Run E2E tests - task: PublishTestResults@2 diff --git a/test/Cli.FunctionalTests/Cli.FunctionalTests.sln b/test/Cli.FunctionalTests/Cli.FunctionalTests.sln index 6aff0f5478..42f7f90f69 100644 --- a/test/Cli.FunctionalTests/Cli.FunctionalTests.sln +++ b/test/Cli.FunctionalTests/Cli.FunctionalTests.sln @@ -5,6 +5,11 @@ VisualStudioVersion = 15.0.28016.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cli.FunctionalTests", "Cli.FunctionalTests.csproj", "{D44EA496-EF83-4D47-8C45-4DAF5A1B0070}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0EC88B4E-B1F2-4183-9EBF-BF66C45D19D7}" + ProjectSection(SolutionItems) = preProject + ..\..\.vsts\builds\e2e-tests.yml = ..\..\.vsts\builds\e2e-tests.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/test/Cli.FunctionalTests/Templates/RazorApplicationBaseTemplate.cs b/test/Cli.FunctionalTests/Templates/RazorApplicationBaseTemplate.cs index f1dceecde4..a7ac0d7001 100644 --- a/test/Cli.FunctionalTests/Templates/RazorApplicationBaseTemplate.cs +++ b/test/Cli.FunctionalTests/Templates/RazorApplicationBaseTemplate.cs @@ -51,11 +51,6 @@ namespace Cli.FunctionalTests.Templates public override IEnumerable ExpectedFilesAfterPublish => base.ExpectedFilesAfterPublish - .Concat(RazorUtil.GetExpectedFilesAfterPublish(this)) - .Concat(new[] - { - "appsettings.Development.json", - "appsettings.json", - }); + .Concat(RazorUtil.GetExpectedFilesAfterPublish(this)); } } diff --git a/test/Cli.FunctionalTests/Templates/WebApiTemplate.cs b/test/Cli.FunctionalTests/Templates/WebApiTemplate.cs index 4bb6fa3c48..5609063371 100644 --- a/test/Cli.FunctionalTests/Templates/WebApiTemplate.cs +++ b/test/Cli.FunctionalTests/Templates/WebApiTemplate.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System.Collections.Generic; -using System.Linq; namespace Cli.FunctionalTests.Templates { @@ -13,13 +11,5 @@ namespace Cli.FunctionalTests.Templates public override string Name => "webapi"; public override string RelativeUrl => "/api/values"; - - public override IEnumerable ExpectedFilesAfterPublish => - base.ExpectedFilesAfterPublish - .Concat(new[] - { - "appsettings.Development.json", - "appsettings.json", - }); } } diff --git a/test/Cli.FunctionalTests/Templates/WebTemplate.cs b/test/Cli.FunctionalTests/Templates/WebTemplate.cs index a2e77925f6..3571ca6cfc 100644 --- a/test/Cli.FunctionalTests/Templates/WebTemplate.cs +++ b/test/Cli.FunctionalTests/Templates/WebTemplate.cs @@ -220,15 +220,29 @@ namespace Cli.FunctionalTests.Templates }, { ("netcoreapp2.2", RuntimeIdentifier.None), () => _additionalFilesAfterPublish[("netcoreapp2.1", RuntimeIdentifier.None)]() + .Concat(new[] + { + "appsettings.Development.json", + "appsettings.json", + }) }, { ("netcoreapp2.2", RuntimeIdentifier.Linux_x64), () => _additionalFilesAfterPublish[("netcoreapp2.1", RuntimeIdentifier.Linux_x64)]() + .Except(new[] + { + "Microsoft.AspNetCore.Identity.UI.Views.dll", + }) .Concat(new[] { + "appsettings.Development.json", + "appsettings.json", "Microsoft.AspNetCore.Diagnostics.HealthChecks.dll", + "Microsoft.AspNetCore.Identity.UI.Views.V3.dll", + "Microsoft.AspNetCore.Identity.UI.Views.V4.dll", "Microsoft.AspNetCore.Server.IIS.dll", "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll", "Microsoft.Extensions.Diagnostics.HealthChecks.dll", + "Microsoft.Extensions.Options.DataAnnotations.dll", }) }, { ("netcoreapp2.2", RuntimeIdentifier.OSX_x64), () => diff --git a/test/Cli.FunctionalTests/run-tests.ps1 b/test/Cli.FunctionalTests/run-tests.ps1 index 871946f15f..5c04f369f9 100644 --- a/test/Cli.FunctionalTests/run-tests.ps1 +++ b/test/Cli.FunctionalTests/run-tests.ps1 @@ -33,9 +33,9 @@ The prodcon channel to use if a build.xml file isn't set. param( [switch]$ci, - $AssetRootUrl = $env:PB_AccessRootUrl, - $AccessTokenSuffix = $env:PB_AccessTokenSuffix, - $RestoreSources = $env:PB_RestoreSources, + $AssetRootUrl = $env:PB_ASSETROOTURL, + $AccessTokenSuffix = $env:PB_ACCESSTOKENSUFFIX, + $RestoreSources = $env:PB_RESTORESOURCES, [ValidateSet('none', 'osx-x64', 'linux-x64', 'win-x64')] $TestRuntimeIdentifier, $HostRid, @@ -138,7 +138,7 @@ try { $env:DOTNET_ROOT = $dotnetRoot $env:DOTNET_MULTILEVEL_LOOKUP = 0 $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 0 - $env:MSBuildSdksPath = '' + $env:MSBUILDSDKSPATH = '' $env:PATH = "$dotnetRoot;$env:PATH" # Required by the tests. It is assumed packages on this feed will end up on nuget.org