terraform/builtin/providers/test
Martin Atkins 477da57a92 helper/plugin: Honor resource type overrides in import
One quirky aspect of our import feature is that we allow the importer to
produce additional resources alongside the one that was imported, such as
to create separate rules for each rule of an imported security group.

Providers need to be able to set the types of these other resources since
they may not match the "main" resource type. They do this by calling
ResourceData.SetType, which in turn sets InstanceState.Ephemeral.Type.

In our shims here we therefore need to copy that out into our new TypeName
field so that the new core import code can see it and create the right
type in the state.

Testing this required a minor change to the test harness to allow the
ImportStateCheck function to see the resource type.
2019-01-30 09:05:08 -08:00
..
data_source.go failing tests when using resources with count 2018-12-17 12:15:43 -05:00
data_source_label.go provider/test: allow assigning a label to each instance 2017-05-11 10:52:51 -07:00
data_source_label_test.go provider/test: allow assigning a label to each instance 2017-05-11 10:52:51 -07:00
data_source_test.go core: Specialized errors for incorrect indexes in resource reference 2018-12-20 13:55:42 -08:00
provider.go helper/plugin: Honor resource type overrides in import 2019-01-30 09:05:08 -08:00
provider_test.go core: Fix issues with ignore_changes 2016-03-21 14:20:36 -05:00
resource.go helper/schema: Opt-in panic on invalid ResourceData.Set 2017-11-08 10:05:11 +00:00
resource_data_dep_test.go udpate test configs to work with hcl2 2018-10-16 19:14:54 -07:00
resource_defaults.go add tests for nested default values 2019-01-17 18:51:18 -05:00
resource_defaults_test.go add more tests 2019-01-23 20:03:10 -05:00
resource_deprecated.go add tests for deprecated/removed attrs 2019-01-12 10:41:04 -05:00
resource_deprecated_test.go add tests for deprecated/removed attrs 2019-01-12 10:41:04 -05:00
resource_diff_suppress.go computed value wasn't being set 2018-11-27 08:54:15 -05:00
resource_diff_suppress_test.go verify DiffSuppresFunc behavior 2018-11-16 11:17:23 -05:00
resource_force_new.go add provider tests for force-new with a map 2018-10-31 13:42:28 -04:00
resource_force_new_test.go add provider tests for force-new with a map 2018-10-31 13:42:28 -04:00
resource_gh12183.go helper/schema: Opt-in panic on invalid ResourceData.Set 2017-11-08 10:05:11 +00:00
resource_gh12183_test.go udpate test configs to work with hcl2 2018-10-16 19:14:54 -07:00
resource_import_other.go helper/plugin: Honor resource type overrides in import 2019-01-30 09:05:08 -08:00
resource_import_other_test.go helper/plugin: Honor resource type overrides in import 2019-01-30 09:05:08 -08:00
resource_list.go add failing test for lost elements in list blocks 2019-01-22 18:10:12 -05:00
resource_list_test.go add failing test for lost elements in list blocks 2019-01-22 18:10:12 -05:00
resource_map.go test for missing map entries 2019-01-23 17:04:17 -05:00
resource_map_test.go test for missing map entries 2019-01-23 17:04:17 -05:00
resource_nested.go add more tests for a computed nested list and set 2019-01-15 11:55:02 -05:00
resource_nested_set.go provider tests for empty values 2019-01-08 16:26:22 -05:00
resource_nested_set_test.go add failing test for lost elements in list blocks 2019-01-22 18:10:12 -05:00
resource_nested_test.go add more tests for a computed nested list and set 2019-01-15 11:55:02 -05:00
resource_state_func.go StateFunc tests 2018-12-03 18:03:45 -05:00
resource_state_func_test.go StateFunc tests 2018-12-03 18:03:45 -05:00
resource_test.go don't count empty containers in diff.Apply 2019-01-23 19:34:11 -05:00
resource_timeout.go add timeout tests to the test provider 2018-10-30 13:14:08 -04:00
resource_timeout_test.go add timeout tests to the test provider 2018-10-30 13:14:08 -04:00
resource_with_custom_diff.go provider/test: Added complex-ish list testing 2017-11-01 14:25:32 -07:00
resource_with_custom_diff_test.go provider/test: Added complex-ish list testing 2017-11-01 14:25:32 -07:00
splat_flatten_test.go udpate test configs to work with hcl2 2018-10-16 19:14:54 -07:00