@@ -17,7 +17,7 @@ public async Task DeployCommandWithHelpArgumentReturnsZero()
17
17
{
18
18
using var tempRepo = TemporaryWorkspace . Create ( outputHelper ) ;
19
19
20
- var services = CliTestHelper . CreateServiceCollection ( tempRepo , outputHelper , options => options . EnabledFeatures = [ KnownFeatures . DeployCommandEnabled ] ) ;
20
+ var services = CliTestHelper . CreateServiceCollection ( tempRepo , outputHelper ) ;
21
21
var provider = services . BuildServiceProvider ( ) ;
22
22
23
23
var command = provider . GetRequiredService < RootCommand > ( ) ;
@@ -35,7 +35,6 @@ public async Task DeployCommandFailsWithInvalidProjectFile()
35
35
// Arrange
36
36
var services = CliTestHelper . CreateServiceCollection ( tempRepo , outputHelper , options =>
37
37
{
38
- options . EnabledFeatures = [ KnownFeatures . DeployCommandEnabled ] ;
39
38
options . DotNetCliRunnerFactory = ( sp ) =>
40
39
{
41
40
var runner = new TestDotNetCliRunner
@@ -69,7 +68,7 @@ public async Task DeployCommandFailsWhenAppHostIsNotCompatible()
69
68
var services = CliTestHelper . CreateServiceCollection ( tempRepo , outputHelper , options =>
70
69
{
71
70
options . ProjectLocatorFactory = ( sp ) => new TestProjectLocator ( ) ;
72
- options . EnabledFeatures = [ KnownFeatures . DeployCommandEnabled ] ;
71
+
73
72
options . DotNetCliRunnerFactory = ( sp ) =>
74
73
{
75
74
var runner = new TestDotNetCliRunner
@@ -103,7 +102,7 @@ public async Task DeployCommandFailsWhenAppHostBuildFails()
103
102
var services = CliTestHelper . CreateServiceCollection ( tempRepo , outputHelper , options =>
104
103
{
105
104
options . ProjectLocatorFactory = ( sp ) => new TestProjectLocator ( ) ;
106
- options . EnabledFeatures = [ KnownFeatures . DeployCommandEnabled ] ;
105
+
107
106
options . DotNetCliRunnerFactory = ( sp ) =>
108
107
{
109
108
var runner = new TestDotNetCliRunner
@@ -137,7 +136,7 @@ public async Task DeployCommandSucceedsEndToEnd()
137
136
var services = CliTestHelper . CreateServiceCollection ( tempRepo , outputHelper , options =>
138
137
{
139
138
options . ProjectLocatorFactory = ( sp ) => new TestProjectLocator ( ) ;
140
- options . EnabledFeatures = [ KnownFeatures . DeployCommandEnabled ] ;
139
+
141
140
options . DotNetCliRunnerFactory = ( sp ) =>
142
141
{
143
142
var runner = new TestDotNetCliRunner
@@ -201,7 +200,7 @@ public async Task DeployCommandIncludesDeployFlagInArguments()
201
200
var services = CliTestHelper . CreateServiceCollection ( tempRepo , outputHelper , options =>
202
201
{
203
202
options . ProjectLocatorFactory = ( sp ) => new TestProjectLocator ( ) ;
204
- options . EnabledFeatures = [ KnownFeatures . DeployCommandEnabled ] ;
203
+
205
204
options . DotNetCliRunnerFactory = ( sp ) =>
206
205
{
207
206
var runner = new TestDotNetCliRunner
@@ -257,38 +256,6 @@ public async Task DeployCommandIncludesDeployFlagInArguments()
257
256
// Assert
258
257
Assert . Equal ( 0 , exitCode ) ;
259
258
}
260
-
261
- [ Fact ]
262
- public void DeployCommand_WhenFeatureFlagDisabled_IsNotAvailable ( )
263
- {
264
- using var workspace = TemporaryWorkspace . Create ( outputHelper ) ;
265
- var services = CliTestHelper . CreateServiceCollection ( workspace , outputHelper ) ;
266
- var provider = services . BuildServiceProvider ( ) ;
267
-
268
- var command = provider . GetRequiredService < RootCommand > ( ) ;
269
-
270
- // Check that the deploy command is not available in the subcommands
271
- var deployCommand = command . Subcommands . FirstOrDefault ( c => c . Name == "deploy" ) ;
272
- Assert . Null ( deployCommand ) ;
273
- }
274
-
275
- [ Fact ]
276
- public void DeployCommand_WhenFeatureFlagEnabled_IsAvailable ( )
277
- {
278
- using var workspace = TemporaryWorkspace . Create ( outputHelper ) ;
279
- var services = CliTestHelper . CreateServiceCollection (
280
- workspace ,
281
- outputHelper ,
282
- options => options . EnabledFeatures = [ KnownFeatures . DeployCommandEnabled ]
283
- ) ;
284
- var provider = services . BuildServiceProvider ( ) ;
285
-
286
- var command = provider . GetRequiredService < RootCommand > ( ) ;
287
-
288
- // Check that the deploy command is available in the subcommands
289
- var deployCommand = command . Subcommands . FirstOrDefault ( c => c . Name == "deploy" ) ;
290
- Assert . NotNull ( deployCommand ) ;
291
- }
292
259
}
293
260
294
261
internal sealed class TestDeployCommandPrompter ( IInteractionService interactionService ) : PublishCommandPrompter ( interactionService )
0 commit comments