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

command: Add terraform untaint #5527

Merged
merged 1 commit into from
Mar 14, 2016
Merged

command: Add terraform untaint #5527

merged 1 commit into from
Mar 14, 2016

Conversation

phinze
Copy link
Contributor

@phinze phinze commented Mar 9, 2016

  • Docs
  • Command Unit Tests
  • State Unit Tests

Closes #4820

@phinze
Copy link
Contributor Author

phinze commented Mar 9, 2016

Want to fill in a few more unit tests for (r *ResourceState) Untaint(index) error but this is ready for initial review at least!

var allowMissing bool
var module string
var index int
cmdFlags := c.Meta.flagSet("taint")
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't the flag set name be untaint? I guess it's just typo.

@phinze phinze changed the title [WIP] command: Add terraform untaint command: Add terraform untaint Mar 9, 2016
@phinze
Copy link
Contributor Author

phinze commented Mar 9, 2016

Thanks for the review, @radeksimko - addressed the typos you caught and added the state unit tests I mentioned. PTAL when you have a moment!

@phinze phinze force-pushed the phinze/untaint branch 2 times, most recently from 7585ded to 5b6ca9e Compare March 10, 2016 18:41
@phinze
Copy link
Contributor Author

phinze commented Mar 11, 2016

@radeksimko ping 😀

@radeksimko
Copy link
Member

@phinze just looking at this...

I first had to look up PTAL abbreviation... I first found Post-Traumatic Activity Level (head injury), so I searched further to find Please Take Another Look. 😄

"github.com/mitchellh/cli"
)

func TestUntaint(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Just a nitpick, but as this is testing a noop case, can we also name it that way, so it's obvious?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this is a noop - it's the "basic" use case - test_instance.foo starts tainted and ends up untainted.

Copy link
Member

Choose a reason for hiding this comment

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

d'oh, obviously, sorry, you're right!

@radeksimko
Copy link
Member

Other than the test naming nitpick and commands.go, this LGTM. I compiled from your branch and tested this on real code, worked 👌

 - [x] Docs
 - [x] Command Unit Tests
 - [x] State Unit Tests

Closes #4820
@radeksimko
Copy link
Member

This LGTM now.

Feel free to merge.

phinze added a commit that referenced this pull request Mar 14, 2016
command: Add `terraform untaint`
@phinze phinze merged commit 5707005 into master Mar 14, 2016
@phinze phinze deleted the phinze/untaint branch March 14, 2016 14:34
@ghost
Copy link

ghost commented Apr 27, 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 and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core: Add support for "terraform untaint" command (undo taint)
2 participants