Forráskód Böngészése

Add note on HashKnownHosts

Girish Ramakrishnan 7 éve
szülő
commit
a2e33496d1
2 módosított fájl, 10 hozzáadás és 0 törlés
  1. 8 0
      README.md
  2. 2 0
      test/test.js

+ 8 - 0
README.md

@@ -47,3 +47,11 @@ if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
         $_SERVER['HTTPS']='on';
 }
 ```
+
+## Tests
+
+* Put `HashKnownHosts no` in your `~/.ssh/config`
+* cd test
+* npm install
+* USERNAME=<> PASSWORD=<> mocha --bail test.js
+

+ 2 - 0
test/test.js

@@ -134,6 +134,7 @@ describe('Application life cycle test', function () {
     it('can view welcome page', welcomePage);
     it('can upload file with sftp', function () {
         // remove from known hosts in case this test was run on other apps with the same domain already
+        // if the tests fail here you want to set "HashKnownHosts no" in ~/.ssh/config
         execSync(util.format('sed -i \'/%s/d\' -i ~/.ssh/known_hosts', app.fqdn));
         execSync(util.format('lftp sftp://%s:%s@%s:%s  -e "set sftp:auto-confirm yes; cd public/; put test.php; bye"', process.env.USERNAME, process.env.PASSWORD, app.fqdn, app.portBindings.SFTP_PORT));
     });
@@ -206,6 +207,7 @@ describe('Application life cycle test', function () {
     });
     it('can upload file with sftp', function () {
         // remove from known hosts in case this test was run on other apps with the same domain already
+        // if the tests fail here you want to set "HashKnownHosts no" in ~/.ssh/config
         execSync(util.format('sed -i \'/%s/d\' -i ~/.ssh/known_hosts', app.fqdn));
         execSync(util.format('lftp sftp://%s:%s@%s:%s  -e "set sftp:auto-confirm yes; cd public/; put test.php; bye"', process.env.USERNAME, process.env.PASSWORD, app.fqdn, app.portBindings.SFTP_PORT));
     });