Skip to content

Commit

Permalink
Fix CLI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Feb 26, 2024
1 parent 035bb5c commit 5538a51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/guides/up_quick_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ALICE_PRIVATE_KEY="0x2153536ff6628eee01cf4024889ff977a18d9fa61d0e414422f7681cf08
# docs:end:declare-accounts

# docs:start:deploy
CONTRACT=$(aztec-cli deploy TokenContractArtifact --salt 0 --args $ALICE "TokenName" "TKN" 18 --json | jq -r '.address')
CONTRACT=$(aztec-cli deploy TokenContractArtifact --private-key $ALICE_PRIVATE_KEY --salt 0 --args $ALICE "TokenName" "TKN" 18 --json | jq -r '.address')
echo "Deployed contract at $CONTRACT"
aztec-cli check-deploy --contract-address $CONTRACT
# docs:end:deploy
Expand Down
5 changes: 4 additions & 1 deletion yarn-project/end-to-end/src/shared/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const cliTestSuite = (
if (addRpcUrl) {
args.push('--rpc-url', rpcURL);
}
debug(`Running command ${args.join(' ')}`);
const res = cli.parseAsync(args);
resetCli();
return res;
Expand Down Expand Up @@ -135,7 +136,9 @@ export const cliTestSuite = (
const ownerAddress = AztecAddress.fromString(foundAddress!);

debug('Deploy Token Contract using created account.');
await run(`deploy ${artifact} --salt ${salt} --args ${ownerAddress} 'TokenName' 'TKN' 18`);
await run(
`deploy ${artifact} --private-key ${privKey} --salt ${salt} --args ${ownerAddress} 'TokenName' 'TKN' 18`,
);
const loggedAddress = findInLogs(/Contract\sdeployed\sat\s+(?<address>0x[a-fA-F0-9]+)/)?.groups?.address;
expect(loggedAddress).toBeDefined();
contractAddress = AztecAddress.fromString(loggedAddress!);
Expand Down

0 comments on commit 5538a51

Please sign in to comment.