Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Redeploy committed Mar 13, 2024
1 parent b5d8407 commit ef76ba7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,14 @@ func TestUtilNormalizedProviderID(t *testing.T) {
description: "id with / characters",
providerID: "aws:////i-12345678",
expectedID: "i-12345678",
}, {
description: "azure standard vm",
providerID: "azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/control-plane-1cbe5-d4dx7",
expectedID: "control-plane-1cbe5-d4dx7",
}, {
description: "azure vmss",
providerID: "azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/vmssName/virtualMachines/0",
expectedID: "azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/vmssName/virtualMachines/0",
}} {
t.Run(tc.description, func(t *testing.T) {
actualID := normalizedProviderString(tc.providerID)
Expand Down

0 comments on commit ef76ba7

Please sign in to comment.