Skip to content

Commit 37211c6

Browse files
committed
fixed linting issues
1 parent bbf07d4 commit 37211c6

File tree

3 files changed

+8
-39
lines changed

3 files changed

+8
-39
lines changed

internal/service/odb/cloud_exadata_infrastructure.go

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package odb
55
import (
66
"context"
77
"errors"
8-
"fmt"
98
"time"
109

1110
"github.com/aws/aws-sdk-go-v2/aws"
@@ -24,16 +23,13 @@ import (
2423
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
2524
"github.com/hashicorp/terraform-plugin-framework/types"
2625
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
27-
"github.com/hashicorp/terraform-provider-aws/internal/conns"
2826
"github.com/hashicorp/terraform-provider-aws/internal/create"
2927
"github.com/hashicorp/terraform-provider-aws/internal/enum"
3028
"github.com/hashicorp/terraform-provider-aws/internal/errs"
3129
"github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag"
3230
"github.com/hashicorp/terraform-provider-aws/internal/framework"
3331
"github.com/hashicorp/terraform-provider-aws/internal/framework/flex"
3432
fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types"
35-
"github.com/hashicorp/terraform-provider-aws/internal/sweep"
36-
sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework"
3733
tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
3834
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
3935
"github.com/hashicorp/terraform-provider-aws/names"
@@ -240,13 +236,13 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res
240236
"compute_model": schema.StringAttribute{
241237
CustomType: computeModelType,
242238
Computed: true,
243-
Description: fmt.Sprint("The OCI model compute model used when you create or clone an\n " +
239+
Description: "The OCI model compute model used when you create or clone an\n " +
244240
" instance: ECPU or OCPU. An ECPU is an abstracted measure of\n " +
245241
"compute resources. ECPUs are based on the number of cores\n " +
246242
"elastically allocated from a pool of compute and storage servers.\n " +
247243
" An OCPU is a legacy physical measure of compute resources. OCPUs\n " +
248244
"are based on the physical core of a processor with\n " +
249-
" hyper-threading enabled."),
245+
" hyper-threading enabled.",
250246
},
251247
"customer_contacts_to_send_to_oci": schema.SetAttribute{
252248
CustomType: fwtypes.NewSetNestedObjectTypeOf[customerContactExaInfraResourceModel](ctx),
@@ -403,7 +399,6 @@ func (r *resourceCloudExadataInfrastructure) Read(ctx context.Context, req resou
403399
}
404400

405401
func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {
406-
407402
var plan, state cloudExadataInfrastructureResourceModel
408403
resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...)
409404
resp.Diagnostics.Append(req.State.Get(ctx, &state)...)
@@ -436,9 +431,7 @@ func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req res
436431
)
437432
return
438433
}
439-
440434
}
441-
442435
updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts)
443436
updatedExaInfra, err := waitCloudExadataInfrastructureUpdated(ctx, conn, state.CloudExadataInfrastructureId.ValueString(), updateTimeout)
444437
if err != nil {
@@ -450,7 +443,6 @@ func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req res
450443
}
451444
resp.Diagnostics.Append(flex.Flatten(ctx, updatedExaInfra, &plan)...)
452445
resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...)
453-
454446
}
455447

456448
func (r *resourceCloudExadataInfrastructure) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {
@@ -650,25 +642,3 @@ type monthExaInfraMaintenanceWindowResourceModel struct {
650642
type customerContactExaInfraResourceModel struct {
651643
Email types.String `tfsdk:"email"`
652644
}
653-
654-
func sweepCloudExadataInfrastructures(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) {
655-
input := odb.ListCloudExadataInfrastructuresInput{}
656-
conn := client.ODBClient(ctx)
657-
var sweepResources []sweep.Sweepable
658-
659-
pages := odb.NewListCloudExadataInfrastructuresPaginator(conn, &input)
660-
for pages.HasMorePages() {
661-
page, err := pages.NextPage(ctx)
662-
if err != nil {
663-
return nil, err
664-
}
665-
666-
for _, v := range page.CloudExadataInfrastructures {
667-
sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceCloudExadataInfrastructure, client,
668-
sweepfw.NewAttribute(names.AttrID, aws.ToString(v.CloudExadataInfrastructureId))),
669-
)
670-
}
671-
}
672-
673-
return sweepResources, nil
674-
}

internal/service/odb/cloud_exadata_infrastructure_data_source_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ func (cloudExaDataInfraDataSourceTest) testAccCheckCloudExadataInfrastructureDes
8383
}
8484

8585
func (cloudExaDataInfraDataSourceTest) basicExaInfraDataSource(displayNameSuffix string) string {
86-
8786
testData := fmt.Sprintf(`
8887
8988

internal/service/odb/cloud_exadata_infrastructure_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var exaInfraTestResource = cloudExaDataInfraResourceTest{
3232
displayNamePrefix: "Ofake-exa",
3333
}
3434

35-
func TestAccODBCloudExadataInfrastructureResourceCreateBasic(t *testing.T) {
35+
func TestAccODBCloudExadataInfrastructureResource_basic(t *testing.T) {
3636
ctx := acctest.Context(t)
3737

3838
if testing.Short() {
@@ -65,7 +65,7 @@ func TestAccODBCloudExadataInfrastructureResourceCreateBasic(t *testing.T) {
6565
},
6666
})
6767
}
68-
func TestAccODBCloudExadataInfrastructureResourceCreateWithAllParameters(t *testing.T) {
68+
func TestAccODBCloudExadataInfrastructureResource_withAllParameters(t *testing.T) {
6969
ctx := acctest.Context(t)
7070

7171
if testing.Short() {
@@ -99,7 +99,7 @@ func TestAccODBCloudExadataInfrastructureResourceCreateWithAllParameters(t *test
9999
})
100100
}
101101

102-
func TestAccODBCloudExadataInfrastructureResourceTagging(t *testing.T) {
102+
func TestAccODBCloudExadataInfrastructureResource_tagging(t *testing.T) {
103103
ctx := acctest.Context(t)
104104
if testing.Short() {
105105
t.Skip("skipping long-running test in short mode")
@@ -153,7 +153,7 @@ func TestAccODBCloudExadataInfrastructureResourceTagging(t *testing.T) {
153153
})
154154
}
155155

156-
func TestAccODBCloudExadataInfrastructureResourceUpdateDisplayName(t *testing.T) {
156+
func TestAccODBCloudExadataInfrastructureResource_updateDisplayName(t *testing.T) {
157157
ctx := acctest.Context(t)
158158
if testing.Short() {
159159
t.Skip("skipping long-running test in short mode")
@@ -204,7 +204,7 @@ func TestAccODBCloudExadataInfrastructureResourceUpdateDisplayName(t *testing.T)
204204
})
205205
}
206206

207-
func TestAccODBCloudExadataInfrastructureResourceUpdateMaintenanceWindow(t *testing.T) {
207+
func TestAccODBCloudExadataInfrastructureResource_updateMaintenanceWindow(t *testing.T) {
208208
ctx := acctest.Context(t)
209209
if testing.Short() {
210210
t.Skip("skipping long-running test in short mode")
@@ -255,7 +255,7 @@ func TestAccODBCloudExadataInfrastructureResourceUpdateMaintenanceWindow(t *test
255255
})
256256
}
257257

258-
func TestAccODBCloudExadataInfrastructureResourceDisappears(t *testing.T) {
258+
func TestAccODBCloudExadataInfrastructureResource_disappears(t *testing.T) {
259259
ctx := acctest.Context(t)
260260
if testing.Short() {
261261
t.Skip("skipping long-running test in short mode")

0 commit comments

Comments
 (0)