Skip to content

Commit 755bad8

Browse files
neverdreamscodycushing
authored andcommitted
using random name for topics in the test.
1 parent f9a0011 commit 755bad8

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

oci/monitoring_alarm_history_collection_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var (
2121
}
2222

2323
AlarmHistoryCollectionResourceConfig = DefinedTagsDependencies + AvailabilityDomainConfig +
24-
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", Required, Create, getTopicRepresentationCopyWithSuffixName("alarmhistorycollection")) +
24+
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", Required, Create, getTopicRepresentationCopyWithRandomNameOrHttpReplayValue(20, charsetWithoutDigits, "talarmhistorycollection")) +
2525
generateResourceFromRepresentationMap("oci_monitoring_alarm", "test_alarm", Required, Create, alarmRepresentation)
2626
)
2727

oci/monitoring_alarm_status_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var (
2020
}
2121

2222
AlarmStatusResourceConfig = DefinedTagsDependencies + AvailabilityDomainConfig +
23-
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", Required, Create, getTopicRepresentationCopyWithSuffixName("alarmstatus")) +
23+
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", Required, Create, getTopicRepresentationCopyWithRandomNameOrHttpReplayValue(10, charsetWithoutDigits, "talarmstatus")) +
2424
generateResourceFromRepresentationMap("oci_monitoring_alarm", "test_alarm", Required, Create, alarmRepresentation)
2525
)
2626

oci/monitoring_alarm_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ var (
6464
}
6565

6666
AlarmResourceDependencies = DefinedTagsDependencies + AvailabilityDomainConfig +
67-
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", Required, Create, getTopicRepresentationCopyWithSuffixName("alarm1")) +
68-
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic2", Required, Create, getTopicRepresentationCopyWithSuffixName("alarm2"))
67+
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", Required, Create, getTopicRepresentationCopyWithRandomNameOrHttpReplayValue(10, charsetWithoutDigits, "talarm1")) +
68+
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic2", Required, Create, getTopicRepresentationCopyWithRandomNameOrHttpReplayValue(10, charsetWithoutDigits, "talarm2"))
6969
)
7070

7171
func TestMonitoringAlarmResource_basic(t *testing.T) {

oci/ons_notification_topic_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ var (
5454
NotificationTopicResourceDependencies = DefinedTagsDependencies
5555
)
5656

57-
func getTopicRepresentationCopyWithSuffixName(suffix string) map[string]interface{} {
57+
func getTopicRepresentationCopyWithRandomNameOrHttpReplayValue(length int, charset string, httpReplayValue string) map[string]interface{} {
5858
return representationCopyWithNewProperties(notificationTopicRepresentation, map[string]interface{}{
59-
"name": Representation{repType: Required, create: "t" + suffix},
59+
"name": Representation{repType: Required, create: randomStringOrHttpReplayValue(length, charset, httpReplayValue)},
6060
})
6161
}
6262

oci/ons_subscription_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var (
4949
}
5050

5151
SubscriptionResourceDependencies = NotificationTopicResourceDependencies +
52-
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", Required, Create, getTopicRepresentationCopyWithSuffixName("subscription"))
52+
generateResourceFromRepresentationMap("oci_ons_notification_topic", "test_notification_topic", Required, Create, getTopicRepresentationCopyWithRandomNameOrHttpReplayValue(10, charsetWithoutDigits, "tsubscription"))
5353
)
5454

5555
func TestOnsSubscriptionResource_basic(t *testing.T) {

0 commit comments

Comments
 (0)