mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Added Azure Blob Container support.
This commit is contained in:
committed by
Caelan Sayler
parent
d03caa0cc2
commit
bfb834b5da
@@ -0,0 +1,42 @@
|
||||
using System.CommandLine;
|
||||
using Velopack.Vpk.Commands;
|
||||
|
||||
namespace Velopack.CommandLine.Tests.Commands;
|
||||
|
||||
public abstract class AzureCommandTests<T> : BaseCommandTests<T>
|
||||
where T : AzureBaseCommand, new()
|
||||
{
|
||||
[Fact]
|
||||
public void Command_WithRequiredEndpointOptions_ParsesValue()
|
||||
{
|
||||
AzureBaseCommand command = new T();
|
||||
|
||||
string cli = $"--account \"account-name\" --key \"shhhh\" --endpoint \"https://endpoint\" --container \"mycontainer\"";
|
||||
ParseResult parseResult = command.ParseAndApply(cli);
|
||||
|
||||
Assert.Empty(parseResult.Errors);
|
||||
Assert.Equal("account-name", command.Account);
|
||||
Assert.Equal("shhhh", command.Key);
|
||||
Assert.Equal("https://endpoint/", command.Endpoint);
|
||||
Assert.Equal("mycontainer", command.Container);
|
||||
}
|
||||
}
|
||||
|
||||
public class AzureDownloadCommandTests : AzureCommandTests<AzureDownloadCommand>
|
||||
{ }
|
||||
|
||||
public class AzureUploadCommandTests : AzureCommandTests<AzureUploadCommand>
|
||||
{
|
||||
public override bool ShouldBeNonEmptyReleaseDir => true;
|
||||
|
||||
//[Fact]
|
||||
//public void KeepMaxReleases_WithNumber_ParsesValue()
|
||||
//{
|
||||
// var command = new S3UploadCommand();
|
||||
|
||||
// string cli = GetRequiredDefaultOptions() + "--keepMaxReleases 42";
|
||||
// ParseResult parseResult = command.ParseAndApply(cli);
|
||||
|
||||
// Assert.Equal(42, command.KeepMaxReleases);
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user