Commit Graph

9 Commits

Author SHA1 Message Date
Sam Boyer b82bd0c280 Condense switch fallthroughs into expr lists 2015-05-26 21:52:36 -04:00
Paul Hinze f2368428d3 helper/schema: write "attr.#": "0" for empty maps
This fixes some perpetual diffs I saw in Atlas AccTests where an empty
map (`map[string]interface{}{}`) was being `d.Set` for "metadata_full".

Because the MapFieldWriter was not distinguishing between empty and nil,
this trigger the "map delete" logic and no count was written to the
state. This caused subsequent plans to improperly report a diff.

Here we redefine the map delete functionality to explicitly trigger only
on `nil`, so we catch the `.#` field for empty maps.
2015-05-06 10:21:22 -05:00
Dave Cunningham aa2015ccd0 Fix failing tests 2015-01-28 16:20:14 -05:00
Dave Cunningham 18c26cb2eb Add some missing Float cases 2015-01-28 12:53:34 -05:00
Sander van Harmelen 2edfd0e89d Just my OCD playing up 😉 2015-01-16 13:30:11 +01:00
Greg Osuri 2769d7cf9c Fixes #813: Ensuring set count (.#) is written to the state 2015-01-16 03:43:57 -08:00
Greg Osuri f870eff5f9 core: fix for #813 - added a gaurd for interface conversion 2015-01-16 00:16:38 -08:00
Mitchell Hashimoto 448887f3c4 helper/schema: map counts in state 2015-01-15 14:12:24 -08:00
Mitchell Hashimoto 03c6453a72 helper/schema: FieldWriter, replace Set 2015-01-10 11:44:26 -08:00