Resolve all 46 low-severity architecture review findings
This commit is contained in:
@@ -28,7 +28,7 @@ public class CommandTreeTests
|
||||
InstanceCommands.Build(Url, Format, Username, Password),
|
||||
SiteCommands.Build(Url, Format, Username, Password),
|
||||
DeployCommands.Build(Url, Format, Username, Password),
|
||||
DataConnectionCommands.Build(Url, Format, Username, Password),
|
||||
BuildDataConnectionGroup(),
|
||||
ExternalSystemCommands.Build(Url, Format, Username, Password),
|
||||
NotificationCommands.Build(Url, Format, Username, Password),
|
||||
SecurityCommands.Build(Url, Format, Username, Password),
|
||||
@@ -41,9 +41,30 @@ public class CommandTreeTests
|
||||
ApiMethodCommands.Build(Url, Format, Username, Password),
|
||||
BundleCommands.Build(Url, Format, Username, Password),
|
||||
CachedCallCommands.Build(Url, Format, Username, Password),
|
||||
SecuredWriteCommands.Build(Url, Format, Username, Password),
|
||||
FlowDebugCommands.Build(Url, Format, Username, Password),
|
||||
};
|
||||
|
||||
private static Command BuildDataConnectionGroup()
|
||||
{
|
||||
var command = DataConnectionCommands.Build(Url, Format, Username, Password);
|
||||
ConnectionBrowseCommands.AddTo(command, Url, Format, Username, Password);
|
||||
return command;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisteredOperationalGroups_IncludeSecuredWritesAndConnectionTools()
|
||||
{
|
||||
var groups = AllCommandGroups().ToList();
|
||||
var secured = groups.Single(g => g.Name == "secured-write");
|
||||
Assert.Equal("list", Assert.Single(secured.Subcommands).Name);
|
||||
var connection = groups.Single(g => g.Name == "data-connection");
|
||||
foreach (var name in new[] { "browse", "search", "verify-endpoint", "certs" })
|
||||
Assert.Contains(connection.Subcommands, c => c.Name == name);
|
||||
var certs = connection.Subcommands.Single(c => c.Name == "certs");
|
||||
Assert.Equal(new[] { "list", "remove", "trust" }, certs.Subcommands.Select(c => c.Name).Order());
|
||||
}
|
||||
|
||||
private static IEnumerable<Command> LeafCommands(Command command)
|
||||
{
|
||||
if (command.Subcommands.Count == 0)
|
||||
@@ -62,11 +83,11 @@ public class CommandTreeTests
|
||||
{
|
||||
var groups = AllCommandGroups().ToList();
|
||||
// CLI-022: bump this count whenever a new top-level command group is
|
||||
// registered in Program.cs. Current registered groups (18):
|
||||
// registered in Program.cs. Current registered groups (19):
|
||||
// template, instance, site, deploy, data-connection, external-system,
|
||||
// notification, security, audit-config, audit, health, debug,
|
||||
// shared-script, db-connection, api-method, bundle, cached-call, flow-debug.
|
||||
Assert.Equal(18, groups.Count);
|
||||
// shared-script, db-connection, api-method, bundle, cached-call, secured-write, flow-debug.
|
||||
Assert.Equal(19, groups.Count);
|
||||
Assert.All(groups, g => Assert.False(string.IsNullOrWhiteSpace(g.Name)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user