forked from prey/prey-node-client
/
runner_spec.js
76 lines (41 loc) · 1.2 KB
/
runner_spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
var exec = require('child_process').exec,
main_script = require('./../package').scripts.start;
describe('prey.js', function(){
// var child;
// var stdout;
// beforeEach(function(){
// child = exec(main_script, function(err, stdout, stderr){
// stdout = stdout;
// });
// });
it('should set Preys ROOT_PATH in process.env', function(){
});
it('should parse command line arguments', function(){
})
describe('when no config file is found', function(){
it('should launch the setup routine', function(){
});
it('should not continue with the rest of the process', function(){
});
});
describe('signals', function(){
it('should set listeners and wait for them to be sent', function(){
})
it('should call encage on agent once SIGUSR1 or SIGUSR2 is received', function(){
})
})
it('should check if pidfile exists', function(){
});
describe('when pidfile exists', function(){
it('should poke the other instance', function(){
});
it('should exit', function(){
});
});
describe('when pidfile does NOT exist', function(){
it('should store the PID in the pidfile', function(){
});
it('should run the main process', function(){
});
});
});