This commit is contained in:
Paul Tyng
2020-09-24 16:57:25 -04:00
parent 3d37110380
commit 8f15aa6dff

View File

@@ -76,7 +76,7 @@ func TestResourceTypes(t *testing.T) {
"MAC": NewFieldInfo("MAC", "mac", "string", "^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$", true, false), "MAC": NewFieldInfo("MAC", "mac", "string", "^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$", true, false),
"Number": NewFieldInfo("Number", "number", "int", "", true, false), "Number": NewFieldInfo("Number", "number", "int", "", true, false),
"Boolean": NewFieldInfo("Boolean", "boolean", "bool", "", false, false), "Boolean": NewFieldInfo("Boolean", "boolean", "bool", "", false, false),
"NestedType": &FieldInfo{ "NestedType": {
FieldName: "NestedType", FieldName: "NestedType",
JSONName: "nested_type", JSONName: "nested_type",
FieldType: "StructNestedType", FieldType: "StructNestedType",
@@ -87,7 +87,7 @@ func TestResourceTypes(t *testing.T) {
"NestedFieldModified": NewFieldInfo("NestedFieldModified", "nested_field", "string", "^$", false, false), "NestedFieldModified": NewFieldInfo("NestedFieldModified", "nested_field", "string", "^$", false, false),
}, },
}, },
"NestedTypeArray": &FieldInfo{ "NestedTypeArray": {
FieldName: "NestedTypeArray", FieldName: "NestedTypeArray",
JSONName: "nested_type_array", JSONName: "nested_type_array",
FieldType: "StructNestedTypeArray", FieldType: "StructNestedTypeArray",
@@ -101,7 +101,7 @@ func TestResourceTypes(t *testing.T) {
} }
expectedStruct := map[string]*FieldInfo{ expectedStruct := map[string]*FieldInfo{
"Struct": &FieldInfo{ "Struct": {
FieldName: "Struct", FieldName: "Struct",
JSONName: "path", JSONName: "path",
FieldType: "struct", FieldType: "struct",