@onlineapps/conn-orch-validator 2.0.26 → 2.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/conn-orch-validator",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.28",
|
|
4
4
|
"description": "Validation orchestrator for OA Drive microservices - coordinates validation across all layers (base, infra, orch, business)",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -158,8 +158,13 @@ class CookbookTestRunner {
|
|
|
158
158
|
const endpoint = await this.resolveOperation(step.service, step.operation);
|
|
159
159
|
|
|
160
160
|
// Build request
|
|
161
|
-
// Validation context:
|
|
162
|
-
//
|
|
161
|
+
// Validation context headers:
|
|
162
|
+
// 1. x-validation-request: signals this is a validation probe (deterministic responses)
|
|
163
|
+
// 2. account-id: required by multitenancy middleware for /api/** endpoints
|
|
164
|
+
const validationAccountId = process.env.OA_VALIDATION_ACCOUNT_ID;
|
|
165
|
+
if (!validationAccountId) {
|
|
166
|
+
throw new Error('[CookbookTestRunner] Missing required environment variable OA_VALIDATION_ACCOUNT_ID');
|
|
167
|
+
}
|
|
163
168
|
const request = {
|
|
164
169
|
method: endpoint.method,
|
|
165
170
|
url: `${this.serviceUrl}${endpoint.path}`,
|
|
@@ -167,6 +172,7 @@ class CookbookTestRunner {
|
|
|
167
172
|
timeout: testConfig.timeout || this.timeout,
|
|
168
173
|
headers: {
|
|
169
174
|
'x-validation-request': 'true',
|
|
175
|
+
'account-id': validationAccountId,
|
|
170
176
|
...resolveHeaders(endpoint.headers),
|
|
171
177
|
...resolveHeaders(step.headers)
|
|
172
178
|
}
|
|
@@ -214,7 +214,19 @@ class ServiceReadinessValidator {
|
|
|
214
214
|
|
|
215
215
|
// Generate test input based on schema
|
|
216
216
|
const testInput = this.generateTestInput(operation.input);
|
|
217
|
-
|
|
217
|
+
|
|
218
|
+
// Validation context headers:
|
|
219
|
+
// 1. x-validation-request: signals this is a validation probe
|
|
220
|
+
// 2. account-id: required by multitenancy middleware for /api/** endpoints
|
|
221
|
+
const validationAccountId = process.env.OA_VALIDATION_ACCOUNT_ID;
|
|
222
|
+
if (!validationAccountId) {
|
|
223
|
+
throw new Error('[ServiceReadinessValidator] Missing required environment variable OA_VALIDATION_ACCOUNT_ID');
|
|
224
|
+
}
|
|
225
|
+
const headers = {
|
|
226
|
+
'x-validation-request': 'true',
|
|
227
|
+
'account-id': validationAccountId,
|
|
228
|
+
...resolveHeaders(operation.headers)
|
|
229
|
+
};
|
|
218
230
|
|
|
219
231
|
// Make request
|
|
220
232
|
const response = await axios({
|