Skip to content

Commit bcff9c9

Browse files
committed
fixed linting issues in example and acc test
1 parent 37211c6 commit bcff9c9

File tree

3 files changed

+70
-72
lines changed

3 files changed

+70
-72
lines changed

examples/odb/exadata_infra.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,3 @@ resource "aws_odb_cloud_exadata_infrastructure" "exa_infra_basic" {
4141
preference = "NO_PREFERENCE"
4242
}
4343
}
44-
45-
# data source for exa infra
46-
data "aws_odb_cloud_exadata_infrastructure" "get-exa-infra" {
47-
id = "<my-exa-infra-id>"
48-
}

internal/service/odb/cloud_exadata_infrastructure_data_source_test.go

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,25 @@ func (cloudExaDataInfraDataSourceTest) basicExaInfraDataSource(displayNameSuffix
8686
testData := fmt.Sprintf(`
8787
8888
89+
90+
8991
resource "aws_odb_cloud_exadata_infrastructure" "test" {
90-
display_name = %[1]q
91-
shape = "Exadata.X9M"
92-
storage_count = 3
93-
compute_count = 2
94-
availability_zone_id = "use1-az6"
95-
customer_contacts_to_send_to_oci = [{email="[email protected]"},{email="[email protected]"}]
96-
maintenance_window {
97-
custom_action_timeout_in_mins = 16
98-
is_custom_action_timeout_enabled = true
99-
patching_mode = "ROLLING"
100-
preference = "NO_PREFERENCE"
92+
display_name = %[1]q
93+
shape = "Exadata.X9M"
94+
storage_count = 3
95+
compute_count = 2
96+
availability_zone_id = "use1-az6"
97+
customer_contacts_to_send_to_oci = [{ email = "[email protected]" }, { email = "[email protected]" }]
98+
maintenance_window {
99+
custom_action_timeout_in_mins = 16
100+
is_custom_action_timeout_enabled = true
101+
patching_mode = "ROLLING"
102+
preference = "NO_PREFERENCE"
101103
}
102104
}
103105
104106
data "aws_odb_cloud_exadata_infrastructure" "test" {
105-
id = aws_odb_cloud_exadata_infrastructure.test.id
107+
id = aws_odb_cloud_exadata_infrastructure.test.id
106108
}
107109
`, displayNameSuffix)
108110
return testData

internal/service/odb/cloud_exadata_infrastructure_test.go

Lines changed: 56 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -352,28 +352,29 @@ func (cloudExaDataInfraResourceTest) testAccPreCheck(ctx context.Context, t *tes
352352
func (cloudExaDataInfraResourceTest) exaDataInfraResourceWithAllConfig(randomId string) string {
353353
exaDataInfra := fmt.Sprintf(`
354354
355+
355356
resource "aws_odb_cloud_exadata_infrastructure" "test" {
356-
display_name = %[1]q
357-
shape = "Exadata.X11M"
358-
storage_count = 3
359-
compute_count = 2
360-
availability_zone_id = "use1-az6"
361-
customer_contacts_to_send_to_oci = [{email="[email protected]"},{email="[email protected]"}]
362-
database_server_type = "X11M"
363-
storage_server_type = "X11M-HC"
364-
maintenance_window {
365-
custom_action_timeout_in_mins = 16
366-
days_of_week = [{ name ="MONDAY"}, {name="TUESDAY"}]
367-
hours_of_day = [11,16]
368-
is_custom_action_timeout_enabled = true
369-
lead_time_in_weeks = 3
370-
months = [{name="FEBRUARY"},{name="MAY"},{name="AUGUST"},{name="NOVEMBER"}]
371-
patching_mode = "ROLLING"
372-
preference = "CUSTOM_PREFERENCE"
373-
weeks_of_month =[2,4]
357+
display_name = %[1]q
358+
shape = "Exadata.X11M"
359+
storage_count = 3
360+
compute_count = 2
361+
availability_zone_id = "use1-az6"
362+
customer_contacts_to_send_to_oci = [{ email = "[email protected]" }, { email = "[email protected]" }]
363+
database_server_type = "X11M"
364+
storage_server_type = "X11M-HC"
365+
maintenance_window {
366+
custom_action_timeout_in_mins = 16
367+
days_of_week = [{ name = "MONDAY" }, { name = "TUESDAY" }]
368+
hours_of_day = [11, 16]
369+
is_custom_action_timeout_enabled = true
370+
lead_time_in_weeks = 3
371+
months = [{ name = "FEBRUARY" }, { name = "MAY" }, { name = "AUGUST" }, { name = "NOVEMBER" }]
372+
patching_mode = "ROLLING"
373+
preference = "CUSTOM_PREFERENCE"
374+
weeks_of_month = [2, 4]
374375
}
375376
tags = {
376-
"env"= "dev"
377+
"env" = "dev"
377378
}
378379
379380
}
@@ -383,16 +384,16 @@ resource "aws_odb_cloud_exadata_infrastructure" "test" {
383384
func (cloudExaDataInfraResourceTest) exaDataInfraResourceBasicConfig(displayName string) string {
384385
exaInfra := fmt.Sprintf(`
385386
resource "aws_odb_cloud_exadata_infrastructure" "test" {
386-
display_name = %[1]q
387-
shape = "Exadata.X9M"
388-
storage_count = 3
389-
compute_count = 2
390-
availability_zone_id = "use1-az6"
391-
maintenance_window {
392-
custom_action_timeout_in_mins = 16
393-
is_custom_action_timeout_enabled = true
394-
patching_mode = "ROLLING"
395-
preference = "NO_PREFERENCE"
387+
display_name = %[1]q
388+
shape = "Exadata.X9M"
389+
storage_count = 3
390+
compute_count = 2
391+
availability_zone_id = "use1-az6"
392+
maintenance_window {
393+
custom_action_timeout_in_mins = 16
394+
is_custom_action_timeout_enabled = true
395+
patching_mode = "ROLLING"
396+
preference = "NO_PREFERENCE"
396397
}
397398
}
398399
`, displayName)
@@ -401,19 +402,19 @@ resource "aws_odb_cloud_exadata_infrastructure" "test" {
401402
func (cloudExaDataInfraResourceTest) exaDataInfraResourceBasicConfigWithTags(displayName string) string {
402403
exaInfra := fmt.Sprintf(`
403404
resource "aws_odb_cloud_exadata_infrastructure" "test" {
404-
display_name = %[1]q
405-
shape = "Exadata.X9M"
406-
storage_count = 3
407-
compute_count = 2
408-
availability_zone_id = "use1-az6"
409-
maintenance_window {
410-
custom_action_timeout_in_mins = 16
411-
is_custom_action_timeout_enabled = true
412-
patching_mode = "ROLLING"
413-
preference = "NO_PREFERENCE"
405+
display_name = %[1]q
406+
shape = "Exadata.X9M"
407+
storage_count = 3
408+
compute_count = 2
409+
availability_zone_id = "use1-az6"
410+
maintenance_window {
411+
custom_action_timeout_in_mins = 16
412+
is_custom_action_timeout_enabled = true
413+
patching_mode = "ROLLING"
414+
preference = "NO_PREFERENCE"
414415
}
415416
tags = {
416-
"env"= "dev"
417+
"env" = "dev"
417418
}
418419
}
419420
`, displayName)
@@ -423,21 +424,21 @@ resource "aws_odb_cloud_exadata_infrastructure" "test" {
423424
func (cloudExaDataInfraResourceTest) basicWithCustomMaintenanceWindow(displayName string) string {
424425
exaInfra := fmt.Sprintf(`
425426
resource "aws_odb_cloud_exadata_infrastructure" "test" {
426-
display_name = %[1]q
427-
shape = "Exadata.X9M"
428-
storage_count = 3
429-
compute_count = 2
430-
availability_zone_id = "use1-az6"
431-
maintenance_window {
432-
custom_action_timeout_in_mins = 16
433-
days_of_week = [{ name ="MONDAY"}, {name="TUESDAY"}]
434-
hours_of_day = [11,16]
435-
is_custom_action_timeout_enabled = true
436-
lead_time_in_weeks = 3
437-
months = [{name="FEBRUARY"},{name="MAY"},{name="AUGUST"},{name="NOVEMBER"}]
438-
patching_mode = "ROLLING"
439-
preference = "CUSTOM_PREFERENCE"
440-
weeks_of_month =[2,4]
427+
display_name = %[1]q
428+
shape = "Exadata.X9M"
429+
storage_count = 3
430+
compute_count = 2
431+
availability_zone_id = "use1-az6"
432+
maintenance_window {
433+
custom_action_timeout_in_mins = 16
434+
days_of_week = [{ name = "MONDAY" }, { name = "TUESDAY" }]
435+
hours_of_day = [11, 16]
436+
is_custom_action_timeout_enabled = true
437+
lead_time_in_weeks = 3
438+
months = [{ name = "FEBRUARY" }, { name = "MAY" }, { name = "AUGUST" }, { name = "NOVEMBER" }]
439+
patching_mode = "ROLLING"
440+
preference = "CUSTOM_PREFERENCE"
441+
weeks_of_month = [2, 4]
441442
}
442443
}
443444
`, displayName)

0 commit comments

Comments
 (0)