Skip to content

Commit

Permalink
fix(checks): Fix reachable check for Baker and ssh connector
Browse files Browse the repository at this point in the history
  • Loading branch information
ssmirr committed Jan 30, 2019
1 parent fa6dba2 commit 7d05ecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/harness/ssh.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ class SSHConnector {
}

async isReachable(host, context) {
let output = (await this.connector.exec(context, `ping -c 3 ${host}`));
let output = (await this.exec(context, `ping -c 3 ${host}`));
if (!(output.includes('nknown host') || output.includes('cannot resolve'))) {
// Domain checks out
return true;
}
// Url is reachable
return (await this.connector.exec(context, `curl -Is ${host} | head -1`)).includes('200 OK');
return (await this.exec(context, `curl -Is ${host} | head -1`)).includes('200 OK');
}

async pathExists(path, context) {
Expand Down

0 comments on commit 7d05ecc

Please sign in to comment.