@@ -170,9 +170,9 @@ func TestEchoFunctionRun(t *testing.T) {
170
170
// this test case shows how the function would be expected to behave.
171
171
" null" : {
172
172
request: function.RunRequest {
173
- Arguments: function.NewArgumentsData (types.StringNull ()),
173
+ Arguments: function.NewArgumentsData ([]attr. Value { types.StringNull ()} ),
174
174
},
175
- Expected : function.RunResponse {
175
+ expected : function.RunResponse {
176
176
Result: function.NewResultData (types.StringNull ()),
177
177
},
178
178
},
@@ -181,17 +181,17 @@ func TestEchoFunctionRun(t *testing.T) {
181
181
// this test case shows how the function would be expected to behave.
182
182
" unknown" : {
183
183
request: function.RunRequest {
184
- Arguments: function.NewArgumentsData (types.StringUnknown ()),
184
+ Arguments: function.NewArgumentsData ([]attr. Value { types.StringUnknown ()} ),
185
185
},
186
- Expected : function.RunResponse {
186
+ expected : function.RunResponse {
187
187
Result: function.NewResultData (types.StringUnknown ()),
188
188
},
189
189
},
190
190
" value-valid" : {
191
191
request: function.RunRequest {
192
- Arguments: function.NewArgumentsData (types.StringValue (" test-value" )),
192
+ Arguments: function.NewArgumentsData ([]attr. Value { types.StringValue (" test-value" )} ),
193
193
},
194
- Expected : function.RunResponse {
194
+ expected : function.RunResponse {
195
195
Result: function.NewResultData (types.StringValue (" test-value" )),
196
196
},
197
197
},
@@ -200,9 +200,9 @@ func TestEchoFunctionRun(t *testing.T) {
200
200
// it did.
201
201
" value-invalid" : {
202
202
request: function.RunRequest {
203
- Arguments: function.NewArgumentsData (types.StringValue () ),
203
+ Arguments: function.NewArgumentsData ([]attr. Value { types.StringValue (" " )} ),
204
204
},
205
- Expected : function.RunResponse {
205
+ expected : function.RunResponse {
206
206
Error: function.NewArgumentFuncError (0 , " error summary: error detail" ),
207
207
Result: function.NewResultData (types.StringUnknown ()),
208
208
},
@@ -215,7 +215,9 @@ func TestEchoFunctionRun(t *testing.T) {
215
215
t.Run (name, func (t *testing.T ) {
216
216
t.Parallel ()
217
217
218
- got := function.RunResponse {}
218
+ got := function.RunResponse {
219
+ Result: function.NewResultData (types.StringUnknown ()),
220
+ }
219
221
220
222
provider.EchoFunction {}.Run (context.Background (), testCase.request , &got)
221
223
0 commit comments