Skip to content

Commit

Permalink
resource/aws_storagegateway_cache: Rename decodeStorageGatewayID to d…
Browse files Browse the repository at this point in the history
…ecodeStorageGatewayCacheID
  • Loading branch information
bflad committed Jul 27, 2018
1 parent db9b9b1 commit ed8bae7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aws/resource_aws_storagegateway_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func resourceAwsStorageGatewayCacheCreate(d *schema.ResourceData, meta interface
func resourceAwsStorageGatewayCacheRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).storagegatewayconn

gatewayARN, diskID, err := decodeStorageGatewayID(d.Id())
gatewayARN, diskID, err := decodeStorageGatewayCacheID(d.Id())
if err != nil {
return err
}
Expand Down Expand Up @@ -107,7 +107,7 @@ func resourceAwsStorageGatewayCacheRead(d *schema.ResourceData, meta interface{}
return nil
}

func decodeStorageGatewayID(id string) (string, string, error) {
func decodeStorageGatewayCacheID(id string) (string, string, error) {
// id = arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0
idFormatErr := fmt.Errorf("expected ID in form of GatewayARN:DiskId, received: %s", id)
gatewayARNAndDisk, err := arn.Parse(id)
Expand Down
4 changes: 2 additions & 2 deletions aws/resource_aws_storagegateway_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestDecodeStorageGatewayCacheID(t *testing.T) {
}

for _, tc := range testCases {
gatewayARN, diskID, err := decodeStorageGatewayID(tc.Input)
gatewayARN, diskID, err := decodeStorageGatewayCacheID(tc.Input)
if tc.ErrCount == 0 && err != nil {
t.Fatalf("expected %q not to trigger an error, received: %s", tc.Input, err)
}
Expand Down Expand Up @@ -104,7 +104,7 @@ func testAccCheckAWSStorageGatewayCacheExists(resourceName string) resource.Test

conn := testAccProvider.Meta().(*AWSClient).storagegatewayconn

gatewayARN, diskID, err := decodeStorageGatewayID(rs.Primary.ID)
gatewayARN, diskID, err := decodeStorageGatewayCacheID(rs.Primary.ID)
if err != nil {
return err
}
Expand Down

0 comments on commit ed8bae7

Please sign in to comment.