From bcac8c64bd9a1622f8ff0dd126c7ebfe156c098c Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Sun, 11 Jan 2015 14:51:48 -0600 Subject: [PATCH] failing schema diff test for TypeFloat refs #768 --- helper/schema/schema_test.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/helper/schema/schema_test.go b/helper/schema/schema_test.go index 9f56d386f..0fd44424a 100644 --- a/helper/schema/schema_test.go +++ b/helper/schema/schema_test.go @@ -1769,6 +1769,36 @@ func TestSchemaMap_Diff(t *testing.T) { Err: false, }, + + // #46 - Float + { + Schema: map[string]*Schema{ + "some_threshold": &Schema{ + Type: TypeFloat, + }, + }, + + State: &terraform.InstanceState{ + Attributes: map[string]string{ + "some_threshold": "567.8", + }, + }, + + Config: map[string]interface{}{ + "some_threshold": 12.34, + }, + + Diff: &terraform.InstanceDiff{ + Attributes: map[string]*terraform.ResourceAttrDiff{ + "port": &terraform.ResourceAttrDiff{ + Old: "567.8", + New: "12.34", + }, + }, + }, + + Err: false, + }, } for i, tc := range cases {