Skip to content

Commit

Permalink
[FAB-3944] renaming Chain.getOrganizationUnits()
Browse files Browse the repository at this point in the history
This method's name came about prior to the MSP's organizational
unit support. To avoid confusion, it should be renamed to
getOrganizations().

Change-Id: I6bb3b63f8db0a6a4eedfc342d0cc3b26896fc5a9
Signed-off-by: Jim Zhang <[email protected]>
  • Loading branch information
jimthematrix committed May 16, 2017
1 parent c8706f9 commit 67364a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions fabric-client/lib/Chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ var Chain = class {
}

/**
* Get organizational unit identifiers from
* the MSP's for this channel
* @returns {string[]}
* Get organization identifiers from the MSP's for this channel
* @returns {string[]} array of MSP identifiers representing the channel's
* participating organizations
*/
getOrganizationUnits() {
getOrganizations() {
logger.debug('getOrganizationUnits - start');
var msps = this._msp_manager.getMSPs();
var orgs = [];
Expand Down
2 changes: 1 addition & 1 deletion test/integration/get-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ test(' ---->>>>> get config <<<<<-----', function(t) {
).then(
function(result) {
t.pass('Chain was successfully initialized');
let orgs = chain.getOrganizationUnits();
let orgs = chain.getOrganizations();
logger.info(' Got the following orgs back %j', orgs);
t.equals(orgs.length, 3, 'Checking the that we got back the right number of orgs');
if(orgs[0].id.indexOf('Or') == 0) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ test('\n\n ** Chain - method tests **\n\n', function (t) {
null,
'checking the chain setMSPManager()'
);
t.notEquals(_chain.getOrganizationUnits(),null,'checking the chain getOrganizationUnits()');
t.notEquals(_chain.getOrganizations(),null,'checking the chain getOrganizations()');
t.end();
});

Expand Down

0 comments on commit 67364a3

Please sign in to comment.