Skip to content

Commit

Permalink
cleanup unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
fjakobs committed Oct 2, 2012
1 parent e708924 commit 1bc6bef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 42 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.svn
nbproject
.settings.xml
.c9revisions
child.log
debug.log
search.txt
Expand Down
42 changes: 0 additions & 42 deletions test/test_ftp.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,6 @@ jsDAV.debugMode = true;
module.exports = {
timeout: 5000,

setUpSuite: function(next) {
if (FTPCredentials.host === "localhost") {
try {
daemon = exec('python', ['test/basic_ftpd.py']);
}
catch(e) {
console.log(
"There was a problem trying to start the FTP service." +
" . This could be because you don't have enough permissions" +
"to run the FTP service on the given port.\n\n" + e
);
}
}

var self = this;
var server;
setTimeout(function() {
server = self.server = jsDAV.createServer({
type: "ftp",
node: "/c9",
ftp: FTPCredentials
}, 8000);

self.ftp = server.tree.ftp;
next();
}, 200);
},

tearDownSuite: function(next) {
if (daemon)
daemon.kill();

this.server.tree.unmount();
this.server = null;
next();
},

"test getRealPath 1": function(next) {
var tree = new FtpTree({
ftp: {
Expand Down Expand Up @@ -86,10 +49,5 @@ module.exports = {
}
};

process.on("exit", function() {
if (module.exports.conn)
module.exports.conn.end();
});

!module.parent && require("./../node_modules/asyncjs/lib/test").testcase(module.exports, "FTP"/*, timeout*/).exec();

0 comments on commit 1bc6bef

Please sign in to comment.