Commit a2e33496 authored by Girish Ramakrishnan's avatar Girish Ramakrishnan

Add note on HashKnownHosts

parent 75cd930c
......@@ -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
......@@ -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));
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment