From 8a88e37f2b02802c4c9b8850be31d207474a644b Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 14 Jun 2017 14:20:37 -0400 Subject: [PATCH] Add string slice with single value test function --- logical/framework/field_data_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/logical/framework/field_data_test.go b/logical/framework/field_data_test.go index a801f9c68d..6bb83fd8ac 100644 --- a/logical/framework/field_data_test.go +++ b/logical/framework/field_data_test.go @@ -180,6 +180,17 @@ func TestFieldDataGet(t *testing.T) { []string{"123", "abc"}, }, + "string slice type, single value": { + map[string]*FieldSchema{ + "foo": &FieldSchema{Type: TypeStringSlice}, + }, + map[string]interface{}{ + "foo": "abc", + }, + "foo", + []string{"abc"}, + }, + "comma string slice type, comma string with one value": { map[string]*FieldSchema{ "foo": &FieldSchema{Type: TypeCommaStringSlice},