From a5df22aeecb16702a0a87e788e49fdad74647d4a Mon Sep 17 00:00:00 2001 From: Quentin MOUTY Date: Fri, 27 Sep 2024 14:31:51 +0200 Subject: [PATCH] Change the health check for e2e --- tests/configEditor.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/configEditor.spec.ts b/tests/configEditor.spec.ts index 3e96148..3c14c15 100644 --- a/tests/configEditor.spec.ts +++ b/tests/configEditor.spec.ts @@ -11,7 +11,8 @@ test('"Save & test" should be successful when configuration is valid', async ({ const healthCheckPath = `${selectors.apis.DataSource.proxy( configPage.datasource.uid, configPage.datasource.id.toString() - )}/health`; + )}/api/v0/healthcheck`; + console.log("test1: healthCheckPath: " +healthCheckPath) await page.route(healthCheckPath, async (route) => await route.fulfill({ status: 200, body: 'OK' })); await expect(configPage.saveAndTest({ path: healthCheckPath })).toBeOK(); }); @@ -26,8 +27,8 @@ test('"Save & test" should display success alert box when config is valid', asyn const healthCheckPath = `${selectors.apis.DataSource.proxy( configPage.datasource.uid, configPage.datasource.id.toString() - )}/health`; - console.log("healthCheckPath: " +healthCheckPath) + )}/api/v0/healthcheck`; + console.log("test2: healthCheckPath: " +healthCheckPath) await expect(configPage.saveAndTest({ path: healthCheckPath })).not.toBeOK(); expect(configPage).toHaveAlert('error'); });