Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/Bicep.Cli.IntegrationTests/Commands/LocalDeployCommandTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Bicep.Core.UnitTests;
using Bicep.Core.UnitTests.Assertions;
using Bicep.Core.UnitTests.Baselines;
using Bicep.Core.UnitTests.Features;
using Bicep.Core.UnitTests.Mock;
using Bicep.Core.UnitTests.Utils;
using Bicep.IO.Abstraction;
Expand Down Expand Up @@ -125,8 +126,10 @@ public async Task Local_deploy_should_succeed()
var services = await ExtensionTestHelper.GetServiceBuilderWithPublishedExtension(GetMockLocalDeployPackage(), new(LocalDeployEnabled: true));
var clientFactory = services.Build().Construct<IContainerRegistryClientFactory>();

var cacheDirectory = FileHelper.GetCacheRootDirectory(TestContext).EnsureExists();

var result = await Bicep(
new InvocationSettings(ClientFactory: clientFactory),
new InvocationSettings(ClientFactory: clientFactory, FeatureOverrides: new(CacheRootDirectory: cacheDirectory)),
services => RegisterExtensionMocks(services, GetExtensionMock()),
TestContext.CancellationTokenSource.Token,
["local-deploy", baselineFolder.EntryFile.OutputFilePath]);
Expand Down Expand Up @@ -172,8 +175,10 @@ public async Task Local_deploy_should_succeed_with_json_output()
var services = await ExtensionTestHelper.GetServiceBuilderWithPublishedExtension(GetMockLocalDeployPackage(), new(LocalDeployEnabled: true));
var clientFactory = services.Build().Construct<IContainerRegistryClientFactory>();

var cacheDirectory = FileHelper.GetCacheRootDirectory(TestContext).EnsureExists();

var result = await Bicep(
new InvocationSettings(ClientFactory: clientFactory),
new InvocationSettings(ClientFactory: clientFactory, FeatureOverrides: new(CacheRootDirectory: cacheDirectory)),
services => RegisterExtensionMocks(services, GetExtensionMock()),
TestContext.CancellationTokenSource.Token,
["local-deploy", baselineFolder.EntryFile.OutputFilePath, "--format", "json"]);
Expand Down Expand Up @@ -269,8 +274,10 @@ public async Task Local_deploy_with_azure_should_succeed(bool async)
var services = await ExtensionTestHelper.GetServiceBuilderWithPublishedExtension(GetMockLocalDeployPackage(), new(LocalDeployEnabled: true));
var clientFactory = services.Build().Construct<IContainerRegistryClientFactory>();

var cacheDirectory = FileHelper.GetCacheRootDirectory(TestContext).EnsureExists();

var result = await Bicep(
new InvocationSettings(ClientFactory: clientFactory),
new InvocationSettings(ClientFactory: clientFactory, FeatureOverrides: new(CacheRootDirectory: cacheDirectory)),
services => RegisterExtensionMocks(services, extensionMock.Object, deploymentProviderMock.Object),
TestContext.CancellationTokenSource.Token,
["local-deploy", baselineFolder.EntryFile.OutputFilePath]);
Expand Down
Loading