-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/glue_partition - add new resource #12547
Conversation
rebased and tested |
15a7311
to
7c0ae00
Compare
aws/resource_aws_glue_partition.go
Outdated
return fmt.Errorf("error creating Glue Partition: %w", err) | ||
} | ||
|
||
d.SetId(fmt.Sprintf("%s:%s:%s:%s", catalogID, dbName, tableName, stringifyAwsGluePartition(values))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a create Glue partition ID function to parallel readAwsGluePartitionID
.
There is also now precedent in moving these ID create/read functions to an internal/service
package.
See e.g. aws/internal/service/ec2/id.go
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSGluePartition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGluePartition_ -timeout 120m
=== RUN TestAccAWSGluePartition_basic
=== PAUSE TestAccAWSGluePartition_basic
=== RUN TestAccAWSGluePartition_disappears
=== PAUSE TestAccAWSGluePartition_disappears
=== CONT TestAccAWSGluePartition_basic
=== CONT TestAccAWSGluePartition_disappears
resource_aws_glue_partition_test.go:48: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSGluePartition_disappears (19.76s)
--- PASS: TestAccAWSGluePartition_basic (22.14s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 22.181s
92fe2a6
to
6f13f5e
Compare
Rebased and revised tests a bit:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSGluePartition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGluePartition_ -timeout 120m
=== RUN TestAccAWSGluePartition_basic
=== PAUSE TestAccAWSGluePartition_basic
=== RUN TestAccAWSGluePartition_multipleValues
=== PAUSE TestAccAWSGluePartition_multipleValues
=== RUN TestAccAWSGluePartition_parameters
=== PAUSE TestAccAWSGluePartition_parameters
=== RUN TestAccAWSGluePartition_disappears
=== PAUSE TestAccAWSGluePartition_disappears
=== CONT TestAccAWSGluePartition_basic
=== CONT TestAccAWSGluePartition_disappears
=== CONT TestAccAWSGluePartition_parameters
=== CONT TestAccAWSGluePartition_multipleValues
=== CONT TestAccAWSGluePartition_disappears
resource_aws_glue_partition_test.go:126: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSGluePartition_disappears (26.79s)
--- PASS: TestAccAWSGluePartition_basic (30.38s)
--- PASS: TestAccAWSGluePartition_multipleValues (30.49s)
--- PASS: TestAccAWSGluePartition_parameters (59.75s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 59.790s
LGTM! 🚀 Thanks @DrFaust92 Verified Acceptance Tests in Commercial (us-west-2) make testacc TEST=./aws TESTARGS='-run=TestAccAWSGluePartition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGluePartition_ -timeout 120m
=== RUN TestAccAWSGluePartition_basic
=== PAUSE TestAccAWSGluePartition_basic
=== RUN TestAccAWSGluePartition_multipleValues
=== PAUSE TestAccAWSGluePartition_multipleValues
=== RUN TestAccAWSGluePartition_parameters
=== PAUSE TestAccAWSGluePartition_parameters
=== RUN TestAccAWSGluePartition_disappears
=== PAUSE TestAccAWSGluePartition_disappears
=== CONT TestAccAWSGluePartition_basic
=== CONT TestAccAWSGluePartition_disappears
=== CONT TestAccAWSGluePartition_multipleValues
=== CONT TestAccAWSGluePartition_parameters
2020/10/01 11:46:14 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
=== CONT TestAccAWSGluePartition_disappears
resource_aws_glue_partition_test.go:126: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSGluePartition_disappears (16.69s)
--- PASS: TestAccAWSGluePartition_multipleValues (18.92s)
--- PASS: TestAccAWSGluePartition_basic (18.93s)
--- PASS: TestAccAWSGluePartition_parameters (43.35s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 45.203s Verified Acceptance Tests in GovCloud (us-gov-west-1) make testacc TEST=./aws TESTARGS='-run=TestAccAWSGluePartition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGluePartition_ -timeout 120m
=== RUN TestAccAWSGluePartition_basic
=== PAUSE TestAccAWSGluePartition_basic
=== RUN TestAccAWSGluePartition_multipleValues
=== PAUSE TestAccAWSGluePartition_multipleValues
=== RUN TestAccAWSGluePartition_parameters
=== PAUSE TestAccAWSGluePartition_parameters
=== RUN TestAccAWSGluePartition_disappears
=== PAUSE TestAccAWSGluePartition_disappears
=== CONT TestAccAWSGluePartition_basic
=== CONT TestAccAWSGluePartition_disappears
=== CONT TestAccAWSGluePartition_multipleValues
=== CONT TestAccAWSGluePartition_parameters
=== CONT TestAccAWSGluePartition_disappears
resource_aws_glue_partition_test.go:126: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSGluePartition_disappears (15.30s)
--- PASS: TestAccAWSGluePartition_basic (15.83s)
--- PASS: TestAccAWSGluePartition_multipleValues (15.97s)
--- PASS: TestAccAWSGluePartition_parameters (34.31s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 35.986s |
This has been released in version 3.9.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Closes #3878
Release note for CHANGELOG:
Output from acceptance testing: