Skip to content

Commit cdc756e

Browse files
committed
Fix the Script Microservice unit test
1 parent 33c943c commit cdc756e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/unit/ProcessMaker/Services/ScriptMicroserviceServiceTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class ScriptMicroserviceServiceTest extends TestCase
1717

1818
private string $instanceUuid;
1919

20+
private string $instanceName;
21+
2022
private string $accessToken;
2123

2224
protected function setUp(): void
@@ -41,6 +43,9 @@ protected function setUp(): void
4143
// Calculate the actual instance UUID that will be used
4244
$this->instanceUuid = $this->service->getInstanceUuid();
4345

46+
// Get the actual instance name that will be used
47+
$this->instanceName = config('app.instance');
48+
4449
// Clear cache before each test
4550
Cache::flush();
4651
}
@@ -233,7 +238,7 @@ public function testCheckTenantCreatesTenantWhenNotFound()
233238
// Tenant creation
234239
$this->baseUrl . '/tenants' => Http::response([
235240
'id' => $this->instanceUuid,
236-
'name' => $this->instanceUuid,
241+
'name' => $this->instanceName,
237242
], 201),
238243
// Access token request
239244
'https://keycloak.test/token' => Http::response([
@@ -256,7 +261,7 @@ public function testCheckTenantCreatesTenantWhenNotFound()
256261
&& $request->method() === 'POST'
257262
&& isset($request->data()['id'])
258263
&& $request->data()['id'] === $this->instanceUuid
259-
&& $request->data()['name'] === $this->instanceUuid;
264+
&& $request->data()['name'] === $this->instanceName;
260265
});
261266

262267
// Verify executor was created after tenant creation

0 commit comments

Comments
 (0)