Skip to content

Commit de635f6

Browse files
varmax2511govindrao55
authored andcommitted
updating test fix for timeouts
1 parent 850cd5a commit de635f6

19 files changed

+80
-80
lines changed

oci/core_image_scenario_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (s *ResourceCoreImageTestSuite) TestAccResourceCoreImage_objectStorageImage
5959
operating_system_version = "7.2"
6060
}
6161
timeouts {
62-
Create = "30m"
62+
create = "30m"
6363
}
6464
}
6565
resource "oci_core_image" "i2" {
@@ -70,7 +70,7 @@ func (s *ResourceCoreImageTestSuite) TestAccResourceCoreImage_objectStorageImage
7070
source_image_type = "QCOW2"
7171
}
7272
timeouts {
73-
Create = "30m"
73+
create = "30m"
7474
}
7575
}
7676
`,

oci/core_image_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var (
5151
}
5252

5353
timeoutsRepresentation = map[string]interface{}{
54-
"Create": Representation{RepType: Required, Create: `30m`},
54+
"create": Representation{RepType: Required, Create: `30m`},
5555
}
5656

5757
ImageResourceDependencies = GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", Required, Create, subnetRepresentation) +

oci/core_instance_resource_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_basic() {
240240
keyC = "[\"valC1\", \"valC2\"]"
241241
}
242242
timeouts {
243-
Create = "15m"
243+
create = "15m"
244244
}
245245
}`,
246246
Check: ComposeAggregateTestCheckFuncWrapper(
@@ -314,7 +314,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_basic() {
314314
keyC = "[\"valC1\", \"valC2\"]"
315315
}
316316
timeouts {
317-
Create = "15m"
317+
create = "15m"
318318
}
319319
}`,
320320
ExpectNonEmptyPlan: false,
@@ -344,7 +344,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_basic() {
344344
keyC = "[\"valC1\", \"valC2\"]"
345345
}
346346
timeouts {
347-
Create = "15m"
347+
create = "15m"
348348
}
349349
}`,
350350
ExpectNonEmptyPlan: false,
@@ -827,7 +827,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_preserveBoot
827827
user_data = "ZWNobyBoZWxsbw=="
828828
}
829829
timeouts {
830-
Create = "15m"
830+
create = "15m"
831831
}
832832
}`,
833833
Check: ComposeAggregateTestCheckFuncWrapper(
@@ -888,7 +888,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_preserveBoot
888888
user_data = "ZWNobyBoZWxsbw=="
889889
}
890890
timeouts {
891-
Create = "15m"
891+
create = "15m"
892892
}
893893
}`,
894894
ExpectNonEmptyPlan: false,
@@ -913,7 +913,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_preserveBoot
913913
user_data = "ZWNobyBoZWxsbw=="
914914
}
915915
timeouts {
916-
Create = "15m"
916+
create = "15m"
917917
}
918918
}`,
919919
Check: ComposeAggregateTestCheckFuncWrapper(
@@ -963,7 +963,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_preserveBoot
963963
user_data = "ZWNobyBoZWxsbw=="
964964
}
965965
timeouts {
966-
Create = "15m"
966+
create = "15m"
967967
}
968968
}
969969
@@ -1020,7 +1020,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_preserveBoot
10201020
user_data = "ZWNobyBoZWxsbw=="
10211021
}
10221022
timeouts {
1023-
Create = "15m"
1023+
create = "15m"
10241024
}
10251025
}`,
10261026
Check: ComposeAggregateTestCheckFuncWrapper(
@@ -1066,7 +1066,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_preserveBoot
10661066
user_data = "ZWNobyBoZWxsbw=="
10671067
}
10681068
timeouts {
1069-
Create = "15m"
1069+
create = "15m"
10701070
}
10711071
}`,
10721072
Check: ComposeAggregateTestCheckFuncWrapper(
@@ -1122,7 +1122,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_preserveBoot
11221122
user_data = "ZWNobyBoZWxsbw=="
11231123
}
11241124
timeouts {
1125-
Create = "15m"
1125+
create = "15m"
11261126
}
11271127
}`,
11281128
ExpectError: regexp.MustCompile("One or more of the specified volumes are not found"),
@@ -1157,7 +1157,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_failedByTime
11571157
user_data = "SWYgeW91IGNhbiBzZWUgdGhpcywgdGhlbiBpdCB3b3JrZWQgbWF5YmUuCg=="
11581158
}
11591159
timeouts {
1160-
Create = "15s"
1160+
create = "15s"
11611161
}
11621162
}`,
11631163
ExpectError: regexp.MustCompile("timeout while waiting for state"),
@@ -1195,7 +1195,7 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_fetchVnicWhe
11951195
keyC = "[\"valC1\", \"valC2\"]"
11961196
}
11971197
timeouts {
1198-
Create = "15m"
1198+
create = "15m"
11991199
}
12001200
state = "STOPPED"
12011201
}`

oci/core_instances_data_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (s *DatasourceCoreInstanceTestSuite) SetupTest() {
7373
ssh_authorized_keys = "${var.ssh_public_key}"
7474
}
7575
timeouts {
76-
Create = "15m"
76+
create = "15m"
7777
}
7878
}`, nil)
7979

oci/core_network_security_group_security_rule_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ func (s *CoreSecurityRuleResourceCrud) Update() error {
518518
request.RequestMetadata.RetryPolicy = GetRetryPolicy(false, "core")
519519
response, err := s.Client.UpdateNetworkSecurityGroupSecurityRules(context.Background(), request)
520520
if err != nil {
521-
return fmt.Errorf("failed to Update security rules, error: %v", err)
521+
return fmt.Errorf("failed to update security rules, error: %v", err)
522522
}
523523
if response.SecurityRules != nil && len(response.SecurityRules) > 0 {
524524
s.Res = &response.SecurityRules[0]

oci/core_public_ip_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ var (
126126
ssh_authorized_keys = "${var.ssh_public_key}"
127127
}
128128
timeouts {
129-
Create = "15m"
129+
create = "15m"
130130
}
131131
}
132132
resource "oci_core_vnic_attachment" "test_vnic_attachments" {

oci/core_volume_attachment_resource_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (s *ResourceCoreVolumeAttachmentTestSuite) SetupTest() {
6060
ssh_authorized_keys = "${var.ssh_public_key}"
6161
}
6262
timeouts {
63-
Create = "15m"
63+
create = "15m"
6464
}
6565
}
6666
@@ -76,7 +76,7 @@ func (s *ResourceCoreVolumeAttachmentTestSuite) SetupTest() {
7676
ssh_authorized_keys = "${var.ssh_public_key}"
7777
}
7878
timeouts {
79-
Create = "15m"
79+
create = "15m"
8080
}
8181
}
8282

oci/crud_helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ func UpdateResource(d *schema.ResourceData, sync ResourceUpdater) error {
412412
d.Partial(false)
413413

414414
if stateful, ok := sync.(StatefullyUpdatedResource); ok {
415-
if e := waitForStateRefresh(stateful, d.Timeout(schema.TimeoutUpdate), "Update", stateful.UpdatedPending(), stateful.UpdatedTarget()); e != nil {
415+
if e := waitForStateRefresh(stateful, d.Timeout(schema.TimeoutUpdate), "update", stateful.UpdatedPending(), stateful.UpdatedTarget()); e != nil {
416416

417417
return e
418418
}
@@ -480,7 +480,7 @@ func stateRefreshFunc(sync StatefulResource) resource.StateRefreshFunc {
480480
// Useful in situations where more than one Update is needed and prior Update needs to complete
481481
func waitForUpdatedState(d *schema.ResourceData, sync ResourceUpdater) error {
482482
if stateful, ok := sync.(StatefullyUpdatedResource); ok {
483-
if e := waitForStateRefresh(stateful, d.Timeout(schema.TimeoutUpdate), "Update", stateful.UpdatedPending(), stateful.UpdatedTarget()); e != nil {
483+
if e := waitForStateRefresh(stateful, d.Timeout(schema.TimeoutUpdate), "update", stateful.UpdatedPending(), stateful.UpdatedTarget()); e != nil {
484484
return e
485485
}
486486
}

oci/database_autonomous_database_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ var (
7575
}
7676

7777
autonomousDatabaseTimeoutsRepresentation = map[string]interface{}{
78-
"Create": Representation{RepType: Required, Create: `20m`},
79-
"Update": Representation{RepType: Required, Create: `20m`},
78+
"create": Representation{RepType: Required, Create: `20m`},
79+
"update": Representation{RepType: Required, Create: `20m`},
8080
"delete": Representation{RepType: Required, Create: `20m`},
8181
}
8282
autonomousDatabaseCopyWithUpdatedIPsRepresentation = GetUpdatedRepresentationCopy("whitelisted_ips", Representation{RepType: Optional, Create: []string{"1.1.1.1/28", "1.1.1.29"}, Update: []string{}}, autonomousDatabaseRepresentation)

oci/database_db_system_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ func (s *DatabaseDbSystemResourceCrud) Update() error {
11091109

11101110
err = s.SetData()
11111111
if err != nil {
1112-
return fmt.Errorf("[ERROR] error setting data after dbsystem Update but before database Update: %v", err)
1112+
return fmt.Errorf("[ERROR] error setting data after dbsystem update but before database Update: %v", err)
11131113
}
11141114

11151115
return s.UpdateDatabaseOperation()

0 commit comments

Comments
 (0)