Skip to content

Commit a18aafa

Browse files
committed
trace: More tests
1 parent 0ec20e5 commit a18aafa

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

test/schema/test_trace.coffee

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,58 @@ schemas = require '../../schema/schemas.js'
33
tv4 = require 'tv4'
44

55
validExamples =
6-
'typical start':
6+
'start recording':
77
protocol: 'trace'
88
command: 'start'
99
payload:
1010
graph: 'mygraph'
1111
secret: 'verygood'
12+
'dump flowtrace.json':
13+
protocol: 'trace'
14+
command: 'dump'
15+
payload:
16+
graph: 'mygraph'
17+
secret: 'verygood'
18+
type: 'flowtrace.json'
19+
'clear buffer':
20+
protocol: 'trace'
21+
command: 'clear'
22+
payload:
23+
graph: 'mygraph'
24+
secret: 'verygood'
25+
'stop recording':
26+
protocol: 'trace'
27+
command: 'stop'
28+
payload:
29+
graph: 'mygraph'
30+
secret: 'verygood'
1231

1332
invalidExamples =
14-
'invalid graph id':
33+
'start with invalid graph id':
1534
protocol: 'trace'
1635
command: 'start'
1736
payload:
1837
graph: 112.0
1938
secret: 'nnice'
39+
'dump with invalid type':
40+
protocol: 'trace'
41+
command: 'dump'
42+
payload:
43+
graph: 'mygraph'
44+
secret: 'verygood'
45+
type: 'not-a-valid-trace-type'
46+
'stop with missing secret':
47+
protocol: 'trace'
48+
command: 'start'
49+
payload:
50+
graph: 112.0
51+
secret: undefined
52+
'clear without graph':
53+
protocol: 'trace'
54+
command: 'start'
55+
payload:
56+
graph: undefined
57+
secret: 'verygood'
2058

2159
testValid = (name) ->
2260
describe name, ->

0 commit comments

Comments
 (0)