mirror of
https://github.com/microsoft/mcp.git
synced 2026-11-04 12:01:31 +00:00
Fix Azure Backup e2e prompts and registration coverage (#3616)
This commit is contained in:
1 parent
ff3175d711
commit
a8870f65b0
2 files changed
+37
-3
No files matched your search
@@ -225,8 +225,8 @@ The `Interaction` column describes whether a prompt can invoke its tool immediat
|
||||
|:----------|:------------|:------------|
|
||||
| azurebackup_backup_status | Check backup status for resource <resource_id> in location <location> | investigation-required |
|
||||
| azurebackup_backup_status | What is the backup status of <resource_id> in location <location> in my subscription? | investigation-required |
|
||||
| azurebackup_disasterrecovery_enable-crr | Enable cross-region restore on vault <vault_name> in resource group <resource_group> | investigation-required |
|
||||
| azurebackup_disasterrecovery_enable-crr | Turn on cross-region restore for vault <vault_name> under resource group <resource_group> | investigation-required |
|
||||
| azurebackup_disasterrecovery_enable-crr | Enable cross-region restore on GRS-enabled Recovery Services vault <vault_name> in resource group <resource_group> with vault-type rsv | investigation-required |
|
||||
| azurebackup_disasterrecovery_enable-crr | Turn on cross-region restore for GRS-enabled DPP backup vault <vault_name> under resource group <resource_group> with vault-type dpp | investigation-required |
|
||||
| azurebackup_governance_find-unprotected | Find unprotected resources of type <resource_type> in my subscription | investigation-required |
|
||||
| azurebackup_governance_find-unprotected | Show me Azure resources that are not backed up for resource type <resource_type> | investigation-required |
|
||||
| azurebackup_governance_find-unprotected | Find unprotected SQL databases and file shares discovered by backup vaults in my subscription | investigation-required |
|
||||
@@ -243,7 +243,7 @@ The `Interaction` column describes whether a prompt can invoke its tool immediat
|
||||
| azurebackup_policy_create | Set up a new backup policy called <policy_name> for AzureFileShare workload in vault <vault_name> under resource group <resource_group> | investigation-required |
|
||||
| azurebackup_policy_create | Create an Enhanced VM backup policy <policy_name> with hourly schedule every 4 hours starting 08:00 for 12 hours in vault <vault_name> under resource group <resource_group> | investigation-required |
|
||||
| azurebackup_policy_create | Create a weekly VM policy <policy_name> on Mondays at 03:00 with 8 weekly, 12 monthly, 5 yearly retention and archive after 90 days in vault <vault_name> under resource group <resource_group> | investigation-required |
|
||||
| azurebackup_policy_create | Create a SQL backup policy <policy_name> with daily full at 02:00, differential on Wednesdays, and 60-minute log frequency in vault <vault_name> under resource group <resource_group> | investigation-required |
|
||||
| azurebackup_policy_create | Create a SQL backup policy <policy_name> with weekly full on Sundays at 02:00, differential on Wednesdays, and 60-minute log frequency in vault <vault_name> under resource group <resource_group> | investigation-required |
|
||||
| azurebackup_policy_create | Create an Azure Disk backup policy <policy_name> with daily, weekly, and monthly retention tiers and vault tier copy enabled in vault <vault_name> under resource group <resource_group> | investigation-required |
|
||||
| azurebackup_policy_update | Update backup policy <policy_name> in vault <vault_name> in resource group <resource_group> to change the schedule time to 04:00 | investigation-required |
|
||||
| azurebackup_policy_update | Modify the daily retention to 60 days for backup policy <policy_name> in vault <vault_name> under resource group <resource_group> | investigation-required |
|
||||
|
||||
+34
@@ -82,6 +82,12 @@ public class AzureBackupSetupTests
|
||||
Assert.Contains(vault.Commands, c => c.Key == "get");
|
||||
Assert.Contains(vault.Commands, c => c.Key == "create");
|
||||
Assert.Contains(vault.Commands, c => c.Key == "update");
|
||||
|
||||
var privateEndpoint = vault.SubGroup.First(g => g.Name == "privateendpoint");
|
||||
Assert.Contains(privateEndpoint.Commands, c => c.Key == "create");
|
||||
Assert.Contains(privateEndpoint.Commands, c => c.Key == "get");
|
||||
Assert.Contains(privateEndpoint.Commands, c => c.Key == "delete");
|
||||
Assert.Contains(privateEndpoint.Commands, c => c.Key == "approve-reject");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -126,6 +132,34 @@ public class AzureBackupSetupTests
|
||||
Assert.Contains(policy.Commands, c => c.Key == "update");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisterCommands_SecurityGroup_ShouldHaveExpectedCommands()
|
||||
{
|
||||
var setup = new AzureBackupSetup();
|
||||
var services = CreateServiceProvider(setup);
|
||||
|
||||
var root = setup.RegisterCommands(services);
|
||||
var security = root.SubGroup.First(g => g.Name == "security");
|
||||
|
||||
Assert.Contains(security.Commands, c => c.Key == "enable-mua");
|
||||
Assert.Contains(security.Commands, c => c.Key == "disable-mua");
|
||||
Assert.Contains(security.Commands, c => c.Key == "configure-encryption");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisterCommands_ResourceGuardGroup_ShouldHaveExpectedCommands()
|
||||
{
|
||||
var setup = new AzureBackupSetup();
|
||||
var services = CreateServiceProvider(setup);
|
||||
|
||||
var root = setup.RegisterCommands(services);
|
||||
var resourceGuard = root.SubGroup.First(g => g.Name == "resourceguard");
|
||||
|
||||
Assert.Contains(resourceGuard.Commands, c => c.Key == "create");
|
||||
Assert.Contains(resourceGuard.Commands, c => c.Key == "get");
|
||||
Assert.Contains(resourceGuard.Commands, c => c.Key == "delete");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegisterCommands_WithNullServiceProvider_ShouldThrow()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user