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 11var assert = require ( "assert" ) ;
2+ var path = require ( "path" ) ;
23
34describe ( "Cred" , function ( ) {
45 var NodeGit = require ( "../../" ) ;
6+ var sshPublicKey = path . resolve ( "./id_rsa.pub" ) ;
7+ var sshPrivateKey = path . resolve ( "./id_rsa" ) ;
58
69 it ( "can create default credentials" , function ( ) {
710 NodeGit . Cred . defaultNew ( ) . then ( function ( defaultCreds ) {
@@ -10,14 +13,13 @@ describe("Cred", function() {
1013 } ) ;
1114
1215 it ( "can create ssh credentials using passed keys" , function ( ) {
13- NodeGit . Cred . sshKeyNew (
16+ var cred = NodeGit . Cred . sshKeyNew (
1417 "username" ,
15- "public key" ,
16- "private key" ,
17- "passphrase" )
18- . then ( function ( sshCreds ) {
19- assert ( sshCreds instanceof NodeGit . Cred ) ;
20- } ) ;
18+ sshPublicKey ,
19+ sshPrivateKey ,
20+ "" ) ;
21+
22+ assert ( cred instanceof NodeGit . Cred ) ;
2123 } ) ;
2224
2325 it ( "can create credentials using plaintext" , function ( ) {
You can’t perform that action at this time.
0 commit comments