|
|
|
|
@ -321,7 +321,7 @@ func TestSchemaMap_Diff(t *testing.T) {
|
|
|
|
|
Err: false,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"#7 String with StateFunc": {
|
|
|
|
|
"String with StateFunc": {
|
|
|
|
|
Schema: map[string]*Schema{
|
|
|
|
|
"availability_zone": &Schema{
|
|
|
|
|
Type: TypeString,
|
|
|
|
|
@ -352,6 +352,36 @@ func TestSchemaMap_Diff(t *testing.T) {
|
|
|
|
|
Err: false,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"StateFunc not called with nil value": {
|
|
|
|
|
Schema: map[string]*Schema{
|
|
|
|
|
"availability_zone": &Schema{
|
|
|
|
|
Type: TypeString,
|
|
|
|
|
Optional: true,
|
|
|
|
|
Computed: true,
|
|
|
|
|
StateFunc: func(a interface{}) string {
|
|
|
|
|
t.Fatalf("should not get here!")
|
|
|
|
|
return ""
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
State: nil,
|
|
|
|
|
|
|
|
|
|
Config: map[string]interface{}{},
|
|
|
|
|
|
|
|
|
|
Diff: &terraform.InstanceDiff{
|
|
|
|
|
Attributes: map[string]*terraform.ResourceAttrDiff{
|
|
|
|
|
"availability_zone": &terraform.ResourceAttrDiff{
|
|
|
|
|
Old: "",
|
|
|
|
|
New: "",
|
|
|
|
|
NewComputed: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
Err: false,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"#8 Variable (just checking)": {
|
|
|
|
|
Schema: map[string]*Schema{
|
|
|
|
|
"availability_zone": &Schema{
|
|
|
|
|
|