Commit Graph

10 Commits

Author SHA1 Message Date
James Bardin
847c8d6244 CBD transformer test update
Comment out an out of date CBD test. The test no longer works due to
the CBD status being checked during plan, but the test case may still
have some value which we can review later.

update the text in the CBD transformer to reflect the
s/ancestor/descendent/ change.
2018-10-16 19:14:11 -07:00
Martin Atkins
88b5607a7a core: Fetch schemas during context construction
Previously we fetched schemas during the AttachSchemaTransformer,
potentially multiple times as that was re-run for each graph built. Now
we fetch the schemas just once during context construction, passing that
result into each of the graph builders.

This only addresses the schema accesses during graph construction. We're
still separately loading schemas during the main walk for evaluation
purposes. This will be addressed in a later commit.
2018-10-16 18:49:20 -07:00
Martin Atkins
bec0f56808 core: Pass components through to the destroy transformers
These transformers both construct temporary graphs using many of the same
transformers used in the apply graph, and properly doing this now requires
access to the providers and provisioners in order to obtain their schemas.

Along with this, we also update the tests here to use the
simpleMockComponentFactory helper to get a mock provider with a schema
already configured, which means we also need to update the test fixtures
and assertions to use the resource type and attributes defined in that
mock factory.
2018-10-16 18:48:28 -07:00
Martin Atkins
4a21b763aa core: Get tests compiling again
After the refactoring to integrate HCL2 many of the tests were no longer
using correct types, attribute names, etc.

This is a bulk update of all of the tests to make them compile again, with
minimal changes otherwise. Although the tests now compile, many of them
do not yet pass. The tests will be gradually repaired in subsequent
commits, as we continue to complete the refactoring and retrofit work.
2018-10-16 18:46:46 -07:00
Mitchell Hashimoto
44233441c2
terraform: CBD edge should ignore "index" 2017-02-07 10:53:12 -08:00
Mitchell Hashimoto
95239a7fe6
terraform: when promoting non-CBD to CBD, mark the config as such
This brings the change for the  new graph. See #10455
2016-12-02 09:46:42 -05:00
Mitchell Hashimoto
4aa84a2071
terraform: CBD makes the proper edge connections for dependent resources 2016-10-19 13:38:53 -07:00
Mitchell Hashimoto
046faf247a
terraform: cleanup and failing test for CBD 2016-10-19 13:38:53 -07:00
Mitchell Hashimoto
4e8e6cd661
dag: add EdgesFrom, EdgesTo, needs tests 2016-10-19 13:38:53 -07:00
Mitchell Hashimoto
7baf64f806
terraform: starting CBD, destroy edge for the destroy relationship 2016-10-19 13:38:52 -07:00