diff --git a/aws/internal/service/cloudwatchevents/id_test.go b/aws/internal/service/cloudwatchevents/id_test.go index 60e46279a23..409ec580ae8 100644 --- a/aws/internal/service/cloudwatchevents/id_test.go +++ b/aws/internal/service/cloudwatchevents/id_test.go @@ -22,15 +22,21 @@ func TestRuleParseID(t *testing.T) { { TestName: "single part", InputID: "TestRule", - ExpectedPart0: "default", + ExpectedPart0: tfevents.DefaultEventBusName, ExpectedPart1: "TestRule", }, { TestName: "two parts", - InputID: "TestEventBus/TestRule", + InputID: tfevents.RuleCreateID("TestEventBus", "TestRule"), ExpectedPart0: "TestEventBus", ExpectedPart1: "TestRule", }, + { + TestName: "two parts with default event bus", + InputID: tfevents.RuleCreateID(tfevents.DefaultEventBusName, "TestRule"), + ExpectedPart0: tfevents.DefaultEventBusName, + ExpectedPart1: "TestRule", + }, { TestName: "partner event bus", InputID: "aws.partner/example.com/Test/TestRule", @@ -119,7 +125,7 @@ func TestTargetParseImportID(t *testing.T) { { TestName: "two parts", InputID: "TestTarget/TestRule", - ExpectedPart0: "default", + ExpectedPart0: tfevents.DefaultEventBusName, ExpectedPart1: "TestTarget", ExpectedPart2: "TestRule", }, @@ -130,6 +136,13 @@ func TestTargetParseImportID(t *testing.T) { ExpectedPart1: "TestRule", ExpectedPart2: "TestTarget", }, + { + TestName: "three parts with default event bus", + InputID: tfevents.DefaultEventBusName + "/TestRule/TestTarget", + ExpectedPart0: tfevents.DefaultEventBusName, + ExpectedPart1: "TestRule", + ExpectedPart2: "TestTarget", + }, { TestName: "empty two parts", InputID: "/",