(t *testing.T)
| 240 | } |
| 241 | |
| 242 | func TestFUNCRESULT(t *testing.T) { |
| 243 | w := &bytes.Buffer{} |
| 244 | api := New(w) |
| 245 | |
| 246 | result := FunctionResult{ |
| 247 | UID: "test-uid", |
| 248 | ContentType: "text/plain", |
| 249 | Payload: "test payload", |
| 250 | Code: "200", |
| 251 | ExpireTimestamp: "1234567890", |
| 252 | } |
| 253 | |
| 254 | api.FUNCRESULT(result) |
| 255 | |
| 256 | expected := "FUNCTION_RESULT_BEGIN test-uid 200 text/plain 1234567890\ntest payload\nFUNCTION_RESULT_END\n\n" |
| 257 | |
| 258 | require.Equal(t, expected, w.String()) |
| 259 | } |
| 260 | |
| 261 | func TestCONFIGCREATE(t *testing.T) { |
| 262 | w := &bytes.Buffer{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…