File tree Expand file tree Collapse file tree 3 files changed +2591
-0
lines changed Expand file tree Collapse file tree 3 files changed +2591
-0
lines changed Original file line number Diff line number Diff line change 1
1
vows = require (' vows' )
2
2
assert = require (' assert' )
3
3
RRD = require (' ../rrd' ).RRD
4
+ exec = require (' child_process' ).exec
4
5
5
6
vows .describe (' RRD' ).addBatch (
6
7
' created a database with invalid contents' :
@@ -98,5 +99,26 @@ vows.describe('RRD').addBatch(
98
99
# Need to figure out how to test this without messing up subsequent test runs
99
100
# 'returns no error': (err) ->
100
101
# assert.equal(err, undefined)
102
+ ' when restoring' :
103
+ ' a valid file' :
104
+ topic : () ->
105
+ RRD .restore (' valid.xml' , " tmp-restore.rrd" , @callback )
106
+ return
107
+
108
+ ' returns no error ' : (err ) ->
109
+ assert .equal (err, null )
110
+
111
+ ' an invalid file' :
112
+ topic : () ->
113
+ RRD .restore (' invalid.xml' , " tmp-restore.rrd" , @callback )
114
+ return
115
+
116
+ # The underlying process never returns an error here.. need to figure out a better way to handle this
117
+ # 'returns an error': (err) ->
118
+ # assert.equal(err, 'some error')
119
+
120
+ ).addBatch (
121
+ ' cleanup ' : () ->
122
+ exec (' rm tmp-*' )
101
123
).export (module , {error : false })
102
124
You can’t perform that action at this time.
0 commit comments