Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions generate/input/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
13 changes: 5 additions & 8 deletions test/tests/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

Expand All @@ -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);
Expand Down