Skip to content
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

helper/resource/testing_new: update import state testing #550

Merged
merged 2 commits into from
Aug 28, 2020

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Aug 25, 2020

Closes #532

testStepNewImportState can now return the error (if any) of the underlying method that imports the resource, thus allowing for error handling w/in runNewTest when step.ImportState is set to true. Special error handling is needed here to account for provider acceptance tests that check for expected errors during ImportState test steps as illustrated in #532.

Output of previously failing acceptance test:

--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_basic (303.34s)

@anGie44 anGie44 requested a review from appilon August 25, 2020 15:01
@anGie44 anGie44 force-pushed the b-v2-import-state-expect-erro branch 2 times, most recently from 6fd9dfb to eaf066a Compare August 26, 2020 14:57
@anGie44 anGie44 force-pushed the b-v2-import-state-expect-erro branch from eaf066a to 9ad7a3f Compare August 26, 2020 14:58
@anGie44 anGie44 changed the title testing_new: handle and format error returned from testStepNewImportState helper/resource/testing_new: handle and format error returned from testStepNewImportState Aug 26, 2020
@anGie44 anGie44 changed the title helper/resource/testing_new: handle and format error returned from testStepNewImportState helper/resource/testing_new: update import state testing Aug 26, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outsider approval -- not sure about any testing to prevent future regressions. 😄

helper/resource/testing_new.go Outdated Show resolved Hide resolved
@bflad
Copy link
Contributor

bflad commented Aug 26, 2020

This would also close #528 in its current form.

Co-authored-by: Brian Flad <bflad417@gmail.com>
@paddycarver paddycarver merged commit 9035784 into hashicorp:master Aug 28, 2020
@anGie44 anGie44 deleted the b-v2-import-state-expect-erro branch August 28, 2020 14:10
paddycarver added a commit that referenced this pull request Sep 3, 2020
Fixed import state testing to be able to return an error that
TestStep.ExpectError can handle.
paddycarver added a commit that referenced this pull request Sep 4, 2020
Fixed import state testing to be able to return an error that
TestStep.ExpectError can handle.
@ghost
Copy link

ghost commented Oct 10, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

1 similar comment
@ghost
Copy link

ghost commented Oct 11, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V2 ImportState Testing Ignoring ExpectError
3 participants