From 73f84f7399c30f6cf3e1a0c46e4b9b9ec26dbced Mon Sep 17 00:00:00 2001 From: Peter Somogyvari Date: Mon, 3 May 2021 15:32:14 -0700 Subject: [PATCH] feat(test-tooling): quorum test ledger omit pull parameter With this boolean argument of the start() method of the test ledger class one can test locally built container images that were no yet pushed to a public docker registry. To use it: build your docker image locally with a tag of "your-tag", then specify this as the tag to be used and also the omitPull argument of the start method as true which will result in your local image being used without any attempts to pull it (which would fail). Signed-off-by: Peter Somogyvari --- .../src/main/typescript/quorum/quorum-test-ledger.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts index 90d75f9d82..2afba6b35d 100644 --- a/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts @@ -171,7 +171,7 @@ export class QuorumTestLedger implements ITestLedger { return { publicKey, privateKey }; } - public async start(): Promise { + public async start(omitPull = false): Promise { const containerNameAndTag = this.getContainerImageName(); if (this.container) { @@ -180,7 +180,9 @@ export class QuorumTestLedger implements ITestLedger { } const docker = new Docker(); - await this.pullContainerImage(containerNameAndTag); + if (!omitPull) { + await this.pullContainerImage(containerNameAndTag); + } return new Promise((resolve, reject) => { const eventEmitter: EventEmitter = docker.run(