diff --git a/x-pack/test/api_integration/apis/transform/reauthorize_transforms.ts b/x-pack/test/api_integration/apis/transform/reauthorize_transforms.ts index 78628a8933bc8..618af9ef4e3ef 100644 --- a/x-pack/test/api_integration/apis/transform/reauthorize_transforms.ts +++ b/x-pack/test/api_integration/apis/transform/reauthorize_transforms.ts @@ -72,13 +72,13 @@ export default ({ getService }: FtrProviderContext) => { TRANSFORM_STATE.STOPPED, `Expected transform state of ${transformId} to be '${TRANSFORM_STATE.STOPPED}' (got ${stats.state})` ); - expect(stats.health.status).to.eql( + expect(stats.health?.status).to.eql( 'red', - `Expected transform health status of ${transformId} to be 'red' (got ${stats.health.status})` + `Expected transform health status of ${transformId} to be 'red' (got ${stats.health?.status})` ); - expect(stats.health.issues![0].type).to.eql( + expect(stats.health?.issues![0].type).to.eql( 'privileges_check_failed', - `Expected transform health issue of ${transformId} to be 'privileges_check_failed' (got ${stats.health.status})` + `Expected transform health issue of ${transformId} to be 'privileges_check_failed' (got ${stats.health?.status})` ); } @@ -94,9 +94,9 @@ export default ({ getService }: FtrProviderContext) => { )})` ); const stats = await transform.api.getTransformStats(transformId); - expect(stats.health.status).to.eql( + expect(stats.health?.status).to.eql( 'green', - `Expected transform health status of ${transformId} to be 'green' (got ${stats.health.status})` + `Expected transform health status of ${transformId} to be 'green' (got ${stats.health?.status})` ); }