Skip to content

Commit d910bae

Browse files
author
Dmytro Yashkir
committed
starting fakes3 tor un tests
1 parent 6faa2cc commit d910bae

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/test.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,26 @@ describe('amazon-s3-url-signer', function(){
1919
});
2020

2121
//start fake s3
22-
/*console.dir('-r test/s3_files -p 1234'.split(' '))
2322
fakes = spawn('fakes3', '-r test/s3_files -p 1234'.split(' '))
2423

2524
fakes.stdout.on('data', function (data) {
26-
console.log('stdout: ' + data);
25+
console.log(''+ data);
2726
});
2827
fakes.on('exit', function (code) {
2928
console.log('child process exited with code ' + code);
3029
});
31-
*/
32-
done()
30+
fakes.stderr.on('data', function (data) {
31+
var log_line = data + '';
32+
console.log(log_line);
33+
if (log_line.match(/WEBrick::HTTPServer#start/)){
34+
done();
35+
}
36+
});
37+
3338
})
3439

3540
after(function(done){
36-
//fakes.kill();
41+
fakes.kill('SIGKILL');//normal sigterm does not work on fakes
3742
done();
3843
})
3944

0 commit comments

Comments
 (0)