Browse Source
Merge pull request #17953 from abpframework/EngincanV/cli-appnolayers-tests
CLI: Should not run `AppTemplateRemoveMongodbCollectionFixtureStep` in nolayers templates since they don't have test projects
pull/17954/head
liangshiwei
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
0 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/TemplateInfo.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateRemoveMongodbCollectionFixtureStep.cs
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using JetBrains.Annotations; |
|
|
|
using Volo.Abp.Cli.ProjectBuilding.Templates.App; |
|
|
|
|
|
|
|
namespace Volo.Abp.Cli.ProjectBuilding.Building; |
|
|
|
|
|
|
|
@ -35,4 +36,9 @@ public abstract class TemplateInfo |
|
|
|
{ |
|
|
|
return Name.EndsWith("-pro", StringComparison.OrdinalIgnoreCase); |
|
|
|
} |
|
|
|
|
|
|
|
public bool IsNoLayer() |
|
|
|
{ |
|
|
|
return Name is AppNoLayersTemplate.TemplateName or AppNoLayersProTemplate.TemplateName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,6 +8,11 @@ public class AppTemplateRemoveMongodbCollectionFixtureStep : ProjectBuildPipelin |
|
|
|
{ |
|
|
|
public override void Execute(ProjectBuildContext context) |
|
|
|
{ |
|
|
|
if (context.Template.IsNoLayer()) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
//MyCompanyName.MyProjectName.Application.Tests
|
|
|
|
RemoveFile(context, "/aspnet-core/test/MyCompanyName.MyProjectName.Application.Tests/MyProjectNameApplicationCollection.cs"); |
|
|
|
RemoveKeyword(context, |
|
|
|
|