mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
validate missing frame from input data
This commit is contained in:
parent
681c48fd12
commit
a80be54a60
1 changed files with 24 additions and 0 deletions
|
|
@ -1389,6 +1389,16 @@ var defaultBody = `
|
|||
"frame":"distance-miles",
|
||||
"valueDestination":"value-to-row"
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"noFrame",
|
||||
"actions":[
|
||||
{
|
||||
"frame":"foo",
|
||||
"valueDestination":"value-to-row"
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1509,6 +1519,20 @@ func TestInput_JSON(t *testing.T) {
|
|||
"withPet": true
|
||||
}]`,
|
||||
err: "columnLabel required"},
|
||||
{json: `[{
|
||||
"id": 1,
|
||||
"cabType": "yellow",
|
||||
"distanceMiles": 8,
|
||||
"withPet": true
|
||||
}`,
|
||||
err: "unexpected EOF"},
|
||||
{json: `[{
|
||||
"id": 1,
|
||||
"cabType": "yellow",
|
||||
"distanceMiles": 8,
|
||||
"noFrame": 1
|
||||
}]`,
|
||||
err: "Frame not found: foo"},
|
||||
}
|
||||
h := NewHandler()
|
||||
h.Holder = hldr.Holder
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue