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

add tests for ForceUnlock #330

Merged
merged 3 commits into from
Aug 31, 2022
Merged

add tests for ForceUnlock #330

merged 3 commits into from
Aug 31, 2022

Conversation

kmoe
Copy link
Member

@kmoe kmoe commented Aug 19, 2022

Follow up to #270.

ForceUnlock:

  • Add basic Cmd tests
  • Add ErrLockIdInvalid error type
  • Add e2e test for error

Also, as of Terraform v0.15.0 terraform force-unlock does not take an optional [DIR] argument, and will error if it is supplied: https://github.com/hashicorp/terraform/blob/main/internal/command/unlock.go#L32

The second commit adds compatibility code for this option.

Several other tfexec commands are missing either the compatibility code or the positional path option entirely. A later PR should make this consistent for all commands modified in hashicorp/terraform@ca23a09.

@kmoe kmoe force-pushed the kmoe/force-unlock-tests branch 2 times, most recently from 0d126e4 to 4ace2d4 Compare August 19, 2022 15:02
@kmoe kmoe force-pushed the kmoe/force-unlock-tests branch from 4ace2d4 to 01c0dca Compare August 19, 2022 15:21
@kmoe kmoe force-pushed the kmoe/force-unlock-tests branch from 01c0dca to e25be3d Compare August 19, 2022 22:01
@kmoe kmoe requested a review from radeksimko August 31, 2022 11:28
@kmoe kmoe merged commit f6775dd into main Aug 31, 2022
@kmoe kmoe deleted the kmoe/force-unlock-tests branch August 31, 2022 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants