Skip to content

Commit

Permalink
FAB-16166 Standardize _lifecycle code package name
Browse files Browse the repository at this point in the history
The name of the code package currently varies by SDK and is not enforced
by the peer.  This change is an attempt to homogenize the code package
naming so that we may enforce and check for a particular name in the
package parsing at the peer.

Change-Id: I8be471979d9e1e819655f6bcd5f32a5e0fc9cfce
Signed-off-by: Jason Yellick <[email protected]>
  • Loading branch information
Jason Yellick committed Aug 1, 2019
1 parent 950b81f commit 6a7e5ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fabric-client/lib/packager/Lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class LifecyclePackager extends BasePackager {
const descriptors = [];
const packageDescriptor = {
bytes: bytes,
name: 'Chaincode-Package.tar.gz'
name: 'code.tar.gz'
};
descriptors.push(packageDescriptor);

Expand Down
4 changes: 2 additions & 2 deletions fabric-client/test/packager/ALifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ describe('Lifecycle Packager', () => {
describe('#buildPackageDescriptors', () => {
it('should return a list of descriptors for the package', async () => {
const descriptors = await lifecycle.buildPackageDescriptors(Buffer.from('abc'));
expect(descriptors[0].name).to.equal('Chaincode-Package.tar.gz');
expect(descriptors[0].name).to.equal('code.tar.gz');
});

it('should return an empty descriptor when no content provided', async () => {
const descriptors = await lifecycle.buildPackageDescriptors();
expect(descriptors[0].name).to.equal('Chaincode-Package.tar.gz');
expect(descriptors[0].name).to.equal('code.tar.gz');
});
});
});

0 comments on commit 6a7e5ef

Please sign in to comment.