-
Notifications
You must be signed in to change notification settings - Fork 30
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
testing: Replace state extract with new value comparers #345
Conversation
// Ensure the id time value is different due to the sleep | ||
if captureTimeState1.Value == captureTimeState2.Value { | ||
t.Fatal("attribute values are the same") | ||
} |
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.
Quick note here since I'm reversing the assertion of this test. The original test was actually asserting the values were the same, but I must've missed that in #295, where I attempted to add this (which it would have failed if I wrote it correctly 😆). This test has been passing since because it's comparing pointer addresses and not the actual string values.
// Ensure the id time value is different due to the sleep | ||
if captureTimeState1.Value == captureTimeState2.Value { | ||
t.Fatal("attribute values are the same") | ||
} |
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.
Ref: hashicorp/terraform-plugin-testing#295
Here is an example failure if you remove the
time.Sleep
test statements now: