File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ describe("Clone", function() {
88 var http = path . resolve ( "test/repos/http" ) ;
99 var https = path . resolve ( "test/repos/https" ) ;
1010 var ssh = path . resolve ( "test/repos/ssh" ) ;
11+ var sshManual = path . resolve ( "test/respos/sshmanual" ) ;
1112 var git = path . resolve ( "test/repos/git" ) ;
1213 var file = path . resolve ( "test/repos/file" ) ;
1314
@@ -80,7 +81,7 @@ describe("Clone", function() {
8081 }
8182 } ;
8283
83- return Clone . clone ( url , ssh , opts ) . then ( function ( repository ) {
84+ return Clone . clone ( url , sshManual , opts ) . then ( function ( repository ) {
8485 assert . ok ( repository instanceof Repository ) ;
8586 } ) ;
8687 } ) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ var assert = require("assert");
22
33describe ( "Cred" , function ( ) {
44 var NodeGit = require ( "../../" ) ;
5+ var sshPublicKey = path . resolve ( "./id_rsa.pub" ) ;
6+ var sshPrivateKey = path . resolve ( "./id_rsa" ) ;
57
68 it ( "can create default credentials" , function ( ) {
79 NodeGit . Cred . defaultNew ( ) . then ( function ( defaultCreds ) {
@@ -10,14 +12,13 @@ describe("Cred", function() {
1012 } ) ;
1113
1214 it ( "can create ssh credentials using passed keys" , function ( ) {
13- NodeGit . Cred . sshKeyNew (
15+ var cred = NodeGit . Cred . sshKeyNew (
1416 "username" ,
15- "public key" ,
16- "private key" ,
17- "passphrase" )
18- . then ( function ( sshCreds ) {
19- assert ( sshCreds instanceof NodeGit . Cred ) ;
20- } ) ;
17+ sshPublicKey ,
18+ sshPrivateKey ,
19+ "" ) ;
20+
21+ assert ( cred instanceof NodeGit . Cred ) ;
2122 } ) ;
2223
2324 it ( "can create credentials using plaintext" , function ( ) {
You can’t perform that action at this time.
0 commit comments