diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 7d542b8e3..3cf5bda01 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1115,6 +1115,17 @@ "remote": { "cType": "git_remote", "functions": { + "git_remote_connect": { + "return": { + "isErrorCode": true + } + }, + "git_remote_download": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, "git_remote_default_branch": { "ignore": true }, diff --git a/test/tests/remote.js b/test/tests/remote.js index af2354491..a6cc28a37 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -91,15 +91,12 @@ describe("Remote", function() { it("can download from a remote", function() { var repo = this.repository; - return Remote.load(repo, "origin") - .then(function(remote) { + return repo.getRemote("origin").then(function(remote) { + remote.checkCert(0); + remote.connect(NodeGit.Enums.DIRECTION.FETCH); + return remote.download(); - }) - .then(function() { - assert(true); - }, function() { - assert(false); }); }); @@ -114,7 +111,7 @@ describe("Remote", function() { it("can fetch from all remotes", function() { // Set a reasonable timeout here for the fetchAll test this.timeout(15000); - + return this.repository.fetchAll({ credentials: function(url, userName) { return NodeGit.Cred.sshKeyFromAgent(userName);