Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Commit

Permalink
fix: pod endpoints should be called via host not agentHost
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfreedman committed May 20, 2017
1 parent 183d5c7 commit 8c9b7e6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 25 deletions.
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,41 @@
"homepage": "https://github.com/symphonyoss/hubot-symphony",
"dependencies": {
"backoff": "2.5.0",
"html-entities": "1.2.0",
"html-entities": "1.2.1",
"log": "1.4.0",
"memoizee": "0.4.4",
"memoizee": "0.4.5",
"request": "2.81.0"
},
"devDependencies": {
"babel-cli": "6.24.0",
"babel-eslint": "7.1.1",
"babel-plugin-transform-class-properties": "6.23.0",
"babel-cli": "6.24.1",
"babel-eslint": "7.2.3",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-flow-strip-types": "6.22.0",
"babel-preset-env": "1.2.2",
"babel-preset-es2016": "6.22.0",
"babel-register": "6.24.0",
"babel-preset-env": "1.4.0",
"babel-preset-es2016": "6.24.1",
"babel-register": "6.24.1",
"chai": "3.5.0",
"codeclimate-test-reporter": "0.4.1",
"coffee-script": "1.12.4",
"coveralls": "2.12.0",
"cross-env": "3.2.4",
"coffee-script": "1.12.6",
"coveralls": "2.13.1",
"cross-env": "5.0.0",
"cz-conventional-changelog": "2.0.0",
"eslint": "3.18.0",
"eslint-config-canonical": "8.0.2",
"eslint": "3.19.0",
"eslint-config-canonical": "8.2.1",
"eslint-config-google": "0.7.1",
"eslint-plugin-flowtype": "2.30.4",
"eslint-plugin-flowtype": "2.33.0",
"eslint-plugin-mocha": "4.9.0",
"flow-bin": "0.42.0",
"flow-bin": "0.46.0",
"ghooks": "2.0.0",
"hubot": "2.19.0",
"husky": "0.13.2",
"mocha": "3.2.0",
"nock": "9.0.9",
"nyc": "10.1.2",
"husky": "0.13.3",
"mocha": "3.4.1",
"nock": "9.0.13",
"nyc": "10.3.2",
"semantic-release": "6.3.6",
"uuid": "3.0.1",
"validate-commit-msg": "2.11.2",
"yargs": "7.0.2"
"validate-commit-msg": "2.12.1",
"yargs": "8.0.1"
},
"config": {
"commitizen": {
Expand Down
4 changes: 2 additions & 2 deletions src/symphony.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ class Symphony {
let headers = {
sessionToken: sessionToken.token,
};
return this._httpGet(this.agentHost, path, headers);
return this._httpGet(this.host, path, headers);
});
}

Expand All @@ -531,7 +531,7 @@ class Symphony {
let headers = {
sessionToken: sessionToken.token,
};
return this._httpPost(this.agentHost, path, headers, body);
return this._httpPost(this.host, path, headers, body);
});
}

Expand Down
1 change: 0 additions & 1 deletion test/adapter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
// @flow

const assert = require('chai').assert;
import {describe, it, beforeEach, afterEach} from 'mocha';
import SymphonyAdapter from '../src/adapter';
import NockServer from './nock-server';
import FakeRobot from './fakes';
Expand Down
12 changes: 11 additions & 1 deletion test/symphony-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
// @flow

const assert = require('chai').assert;
import {describe, it, beforeEach, afterEach} from 'mocha';
import {TextListener} from 'hubot';
import type {RoomMembershipType} from '../src/symphony';
import Symphony from '../src/symphony';
Expand Down Expand Up @@ -62,6 +61,17 @@ describe('On-premise key manager / agent', () => {
done(`Failed with error ${error}`);
});
});

it('should connect to separate pod url', (done) => {
symphony.whoAmI()
.then((response) => {
assert.equal(nock.botUserId, response.userId);
done();
})
.catch((error) => {
done(`Failed with error ${error}`);
});
});
});

describe('REST API test suite', () => {
Expand Down

0 comments on commit 8c9b7e6

Please sign in to comment.