Commit Graph

11 Commits

Author SHA1 Message Date
Mitchell Hashimoto 4f6edf4fe4
helper/resource: id-only refresh testing 2016-04-20 09:16:48 -07:00
Paul Hinze 24048b4dca providers: Mention check number when acctest fails 2016-02-02 10:57:28 -06:00
Paul Hinze 88744d569f helper/resource/testing: unit tests to cover #1770
Also clarified that final return value of testStep is now only for the
happy path.
2015-05-01 11:22:06 -05:00
Paul Hinze 149e52ad1f helper/resource: verify refresh+plan after each step
I forgot to add `Computed: true` when I made the "key_name" field
optional in #1751.

This made the behavior:

 * Name generated in Create and set as ID
 * Follow up plan (without refresh) was nice and empty
 * During refresh, name gets cleared out on Read, causing a bad diff on
   subsequent plans

We can automatically catch bugs like this if we add yet another
verification step to our resource acceptance tests -> a post
Refresh+Plan that we verify is empty.

I left the non-refresh Plan verification in, because it's important that
_both_ of these are empty after an Apply.
2015-04-30 12:52:25 -05:00
Paul Hinze 7fe34d4547 providers: check for empty plan after each test step
Each acceptance test step plays a Refresh, Plan, Apply for a given
config. This adds a follow up Plan and fails the test if it does not
come back empty. This will catch issues with perpetual, unresolvable
diffs that crop up here and there.

This is going to cause a lot of our existing acceptance tests to fail -
too many to roll into a single PR. I think the best plan is to land this
in master and then fix the failures (each of which should be catching a
legitimate provider bug) one by one until we get the provider suites
back to green.
2015-04-09 10:19:01 -05:00
Mitchell Hashimoto 9b2b3a963f ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
Mitchell Hashimoto 0bcbccf046 helper/resource: compiles, fails because Context doesn't work, probably 2014-09-16 17:02:05 -07:00
Mitchell Hashimoto 4a3d51f40e helper/resource: can compose TestCheckFuncs 2014-07-10 13:29:38 -07:00
Mitchell Hashimoto 83f73e63aa helper/resource: add PreCheck 2014-07-10 13:12:47 -07:00
Mitchell Hashimoto 55c1bf7f79 helper/resource: more tests 2014-07-10 10:30:41 -07:00
Mitchell Hashimoto e0fbd48afd helper/resource: Acceptance test framework 2014-07-10 10:20:21 -07:00