File tree 2 files changed +28
-2
lines changed
2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change
1
+ import path from 'node:path'
2
+
3
+ import { CamundaRestClient } from '../../../c8/lib/CamundaRestClient'
4
+
5
+ let processDefinitionId : string
6
+ const restClient = new CamundaRestClient ( )
7
+
8
+ test ( 'It can deploy with a specific tenantId' , async ( ) => {
9
+ const res = await restClient . deployResourcesFromFiles (
10
+ [
11
+ path . join (
12
+ '.' ,
13
+ 'src' ,
14
+ '__tests__' ,
15
+ 'testdata' ,
16
+ 'hello-world-complete-rest.bpmn'
17
+ ) ,
18
+ ] ,
19
+ { tenantId : 'green' }
20
+ )
21
+ processDefinitionId = res . processes [ 0 ] . processDefinitionId
22
+ expect ( processDefinitionId ) . toBeTruthy ( )
23
+ } )
Original file line number Diff line number Diff line change @@ -843,7 +843,10 @@ export class CamundaRestClient {
843
843
*
844
844
* @since 8.6.0
845
845
*/
846
- public async deployResourcesFromFiles ( files : string [ ] ) {
846
+ public async deployResourcesFromFiles (
847
+ files : string [ ] ,
848
+ { tenantId } : { tenantId ?: string } = { }
849
+ ) {
847
850
const resources : { content : string ; name : string } [ ] = [ ]
848
851
849
852
for ( const file of files ) {
@@ -853,7 +856,7 @@ export class CamundaRestClient {
853
856
} )
854
857
}
855
858
856
- return this . deployResources ( resources )
859
+ return this . deployResources ( resources , tenantId ?? this . tenantId )
857
860
}
858
861
859
862
/**
You can’t perform that action at this time.
0 commit comments