Commit Graph

5 Commits

Author SHA1 Message Date
James Bardin
edacd9ff4d add Provider schema to the contextFixture 2018-10-16 18:49:20 -07:00
Martin Atkins
f82c192c49 core: mock provider factory functions for testing
Now that any configuration processing requires schema, we need either a
standalone schema or a provider/provisioner configured with one a lot more
often in tests.

To avoid adding loads of extra boilerplate to the tests, these new helper
functions produce objects pre-configured with a schema that should be
useful for a number of different cases, and can be customized further for
more interesting situations.

A lot of our tests can then just use these pre-defined object and
attribute names in their fixtures in situations where the canned schemas
here are good enough.
2018-10-16 18:48:28 -07:00
Martin Atkins
7188cabdaf core: Testing helpers for building provider schemas
Now that a schema is required to decode resource configuration, a lot more
tests than before need access to mock providers in order to get a schema.
These new helpers allow a mock provider with a schema to be constructed
concisely.
2018-10-16 18:48:28 -07:00
Mitchell Hashimoto
d6f7261190 terraform: provider mock should close itself to find bugs 2015-06-29 10:33:37 -07:00
Mitchell Hashimoto
0c1a341d90 terraform: Resources method for providers 2014-06-03 14:26:31 -07:00