Skip to content

Commit

Permalink
exact match IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
stephybun committed May 8, 2024
1 parent 6a5459a commit b841221
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions resourcemanager/commonids/composite_resource_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package commonids

import (
"fmt"
"strings"
"testing"
)

Expand All @@ -25,17 +24,17 @@ func TestNewCompositeResourceID(t *testing.T) {

id := NewCompositeResourceID(botId, appId)

if !strings.EqualFold(id.First.ID(), botIdString) {
if id.First.ID() != botIdString {
t.Fatalf("expected First ID string to be %q but got %q", botIdString, id.First.ID())
}

if !strings.EqualFold(id.Second.ID(), appIdString) {
if id.Second.ID() != appIdString {
t.Fatalf("expected Second ID string to be %q but got %q", appIdString, id.Second.ID())
}

expectedIdString := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.BotService/botServices/botServiceValue|/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Web/sites/siteValue"

if !strings.EqualFold(id.ID(), expectedIdString) {
if id.ID() != expectedIdString {
t.Fatalf("Expected ID string to be %q but got %q", expectedIdString, id.ID())
}
}
Expand Down

0 comments on commit b841221

Please sign in to comment.