Skip to content

Commit 389cc19

Browse files
authored
Merge fix lint from OsamaRab3/fix228
fix lint error
2 parents 7fafe44 + 449943d commit 389cc19

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

e2e/fabloCommands.test.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,34 @@ describe("extend config", () => {
185185

186186
it("should throw an error for duplicate chaincode names across different channels", () => {
187187
// Given
188-
commands.fabloExec("init node");
188+
commands.fabloExec("init");
189189
const configPath = `${commands.workdir}/fablo-config.json`;
190-
const config = JSON.parse(fs.readFileSync(configPath, "utf8")) as FabloConfigJson;
190+
// const config = JSON.parse(fs.readFileSync(configPath, "utf8")) as FabloConfigJson;
191+
const config = JSON.parse(commands.getFileContent("fablo-config.json")) as FabloConfigJson;
191192

192193
config.channels.push({
193194
name: "my-channel2",
194195
orgs: [{ name: "Org1", peers: ["peer0"] }],
195196
});
196197

197-
const existingChaincode = JSON.parse(JSON.stringify(config.chaincodes[0]));
198-
existingChaincode.channel = "my-channel2";
199-
config.chaincodes.push(existingChaincode);
198+
config.chaincodes.push(
199+
{
200+
name: "chaincode1",
201+
version: "1.0",
202+
channel: "my-channel",
203+
lang: "node",
204+
directory: "./samples/chaincodes/chaincode-kv-node",
205+
privateData: [],
206+
},
207+
{
208+
name: "chaincode1",
209+
version: "1.0",
210+
channel: "my-channel2",
211+
lang: "node",
212+
directory: "./samples/chaincodes/chaincode-kv-node",
213+
privateData: [],
214+
},
215+
);
200216

201217
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
202218

0 commit comments

Comments
 (0)