@@ -3976,17 +3976,17 @@ test_resource_id = 12345`
3976
3976
func TestTest_UseOfBackends_priorStateUsedByBackend (t * testing.T ) {
3977
3977
3978
3978
dirName := "valid-use-local-backend/with-prior-state"
3979
- resourceId := "53d69028-477d-7ba0-83c3-ff3807e3756f"
3980
- expectedState := `test_resource.foobar:
3981
- ID = 53d69028-477d-7ba0-83c3-ff3807e3756f
3979
+ resourceId := "53d69028-477d-7ba0-83c3-ff3807e3756f" // This value needs to match the state file in the test fixtures
3980
+ expectedState := fmt . Sprintf ( `test_resource.foobar:
3981
+ ID = %s
3982
3982
provider = provider["registry.terraform.io/hashicorp/test"]
3983
3983
destroy_fail = false
3984
3984
value = value-from-run-that-controls-backend
3985
3985
3986
3986
Outputs:
3987
3987
3988
3988
supplied_input_value = value-from-run-that-controls-backend
3989
- test_resource_id = 53d69028-477d-7ba0-83c3-ff3807e3756f`
3989
+ test_resource_id = %s` , resourceId , resourceId )
3990
3990
3991
3991
// SETUP
3992
3992
td := t .TempDir ()
@@ -3998,8 +3998,8 @@ test_resource_id = 53d69028-477d-7ba0-83c3-ff3807e3756f`
3998
3998
// to resemble what's in state / the remote object being reused by the test.
3999
3999
resourceStore := & testing_command.ResourceStore {
4000
4000
Data : map [string ]cty.Value {
4001
- "53d69028-477d-7ba0-83c3-ff3807e3756f" : cty .ObjectVal (map [string ]cty.Value {
4002
- "id" : cty .StringVal ("53d69028-477d-7ba0-83c3-ff3807e3756f" ),
4001
+ resourceId : cty .ObjectVal (map [string ]cty.Value {
4002
+ "id" : cty .StringVal (resourceId ),
4003
4003
"interrupt_count" : cty .NullVal (cty .Number ),
4004
4004
"value" : cty .StringVal ("value-from-run-that-controls-backend" ),
4005
4005
"write_only" : cty .NullVal (cty .String ),
0 commit comments