Skip to content

Commit 4758af8

Browse files
committed
test: fix test setup
1 parent c976899 commit 4758af8

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/zeebe/lib/cancelProcesses.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { Camunda8 } from '../../c8'
2-
import { OperateApiClient } from '../../operate'
32

4-
const operate = new OperateApiClient()
5-
const camunda = new Camunda8().getCamundaRestClient()
6-
const topology = camunda.getTopology()
3+
const c8 = new Camunda8()
4+
const camunda = c8.getCamundaRestClient()
5+
const operate = c8.getOperateApiClient()
76

87
export async function cancelProcesses(processDefinitionKey: string) {
9-
const gatewayVersion = (await topology).gatewayVersion
8+
const topology = await camunda.getTopology()
9+
10+
const gatewayVersion = topology.gatewayVersion
1011
const [major, minor] = gatewayVersion.split('.').map(Number)
1112
const useCamundaRestClient = major > 8 || (major === 8 && minor >= 8)
1213
const { searchProcessInstances, cancelProcessInstance } = useCamundaRestClient

0 commit comments

Comments
 (0)