From 3504f6b3b2948f623554b896713e7493bd6ffcae Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Fri, 8 Mar 2024 17:37:33 -0500 Subject: [PATCH] Rename stubs --- test/deploy.js | 6 +++--- test/get-approval-process.js | 6 +++--- test/propose-upgrade.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/deploy.js b/test/deploy.js index 5314215..3579d90 100644 --- a/test/deploy.js +++ b/test/deploy.js @@ -38,7 +38,7 @@ test.beforeEach(t => { }); t.context.deployContractStub = deployContractStub; - t.context.fakeDefenderClient = { + t.context.fakeDeployClient = { deployContract: deployContractStub, getDeployedContract: getDeployedContractStub, }; @@ -60,7 +60,7 @@ test.afterEach.always(t => { test('deploy required args', async t => { const args = ['--contractName', 'MyContract', '--contractPath', 'contracts/MyContract.sol', '--chainId', FAKE_CHAIN_ID, '--buildInfoFile', 'test/input/build-info.json']; - await deploy(args, t.context.fakeDefenderClient, t.context.fakeNetworkClient); + await deploy(args, t.context.fakeDeployClient, t.context.fakeNetworkClient); t.is(t.context.deployContractStub.callCount, 1); @@ -81,7 +81,7 @@ test('deploy required args', async t => { test('deploy all args', async t => { const args = ['--contractName', 'MyContract', '--contractPath', 'contracts/MyContract.sol', '--chainId', FAKE_CHAIN_ID, '--buildInfoFile', 'test/input/build-info.json', '--constructorBytecode', '0x1234', '--licenseType', 'MIT', '--verifySourceCode', 'false', '--relayerId', 'my-relayer-id', '--salt', '0x4567', '--createFactoryAddress', '0x0000000000000000000000000000000000098765']; - await deploy(args, t.context.fakeDefenderClient, t.context.fakeNetworkClient); + await deploy(args, t.context.fakeDeployClient, t.context.fakeNetworkClient); t.is(t.context.deployContractStub.callCount, 1); diff --git a/test/get-approval-process.js b/test/get-approval-process.js index f83f1e8..b22a0f2 100644 --- a/test/get-approval-process.js +++ b/test/get-approval-process.js @@ -43,7 +43,7 @@ test.beforeEach(t => { viaType: 'Multisig', }); - t.context.fakeDefenderClient = { + t.context.fakeDeployClient = { getDeployApprovalProcess: t.context.getDeployApprovalProcessStub, getUpgradeApprovalProcess: t.context.getUpgradeApprovalProcessStub, }; @@ -65,7 +65,7 @@ test.afterEach.always(t => { test('getDeployApprovalProcess args', async t => { const args = ['--chainId', FAKE_CHAIN_ID]; - await getApprovalProcess('getDeployApprovalProcess', args, t.context.fakeDefenderClient, t.context.fakeNetworkClient); + await getApprovalProcess('getDeployApprovalProcess', args, t.context.fakeDeployClient, t.context.fakeNetworkClient); t.is(t.context.getDeployApprovalProcessStub.callCount, 1); t.is(t.context.getUpgradeApprovalProcessStub.callCount, 0); @@ -76,7 +76,7 @@ test('getDeployApprovalProcess args', async t => { test('getUpgradeApprovalProcess args', async t => { const args = ['--chainId', FAKE_CHAIN_ID]; - await getApprovalProcess('getUpgradeApprovalProcess', args, t.context.fakeDefenderClient, t.context.fakeNetworkClient); + await getApprovalProcess('getUpgradeApprovalProcess', args, t.context.fakeDeployClient, t.context.fakeNetworkClient); t.is(t.context.getDeployApprovalProcessStub.callCount, 0); t.is(t.context.getUpgradeApprovalProcessStub.callCount, 1); diff --git a/test/propose-upgrade.js b/test/propose-upgrade.js index c25b33a..3c2983d 100644 --- a/test/propose-upgrade.js +++ b/test/propose-upgrade.js @@ -33,7 +33,7 @@ test.beforeEach(t => { }); t.context.upgradeContractStub = upgradeContractStub; - t.context.fakeDefenderClient = { + t.context.fakeDeployClient = { upgradeContract: upgradeContractStub, }; @@ -54,7 +54,7 @@ test.afterEach.always(t => { test('proposeUpgrade required args', async t => { const args = ['--proxyAddress', PROXY_ADDRESS, '--newImplementationAddress', NEW_IMPLEMENTATION_ADDRESS, '--chainId', FAKE_CHAIN_ID]; - await proposeUpgrade(args, t.context.fakeDefenderClient, t.context.fakeNetworkClient); + await proposeUpgrade(args, t.context.fakeDeployClient, t.context.fakeNetworkClient); t.is(t.context.upgradeContractStub.callCount, 1); @@ -71,7 +71,7 @@ test('proposeUpgrade required args', async t => { test('proposeUpgrade all args', async t => { const args = ['--proxyAddress', PROXY_ADDRESS, '--newImplementationAddress', NEW_IMPLEMENTATION_ADDRESS, '--chainId', FAKE_CHAIN_ID, '--proxyAdminAddress', PROXY_ADMIN_ADDRESS, '--contractArtifactFile', ABI_FILE, '--approvalProcessId', APPROVAL_PROCESS_ID]; - await proposeUpgrade(args, t.context.fakeDefenderClient, t.context.fakeNetworkClient); + await proposeUpgrade(args, t.context.fakeDeployClient, t.context.fakeNetworkClient); t.is(t.context.upgradeContractStub.callCount, 1);