Skip to content

Commit

Permalink
Change the health check for e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin MOUTY committed Sep 27, 2024
1 parent 75b4dcb commit d95074e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/configEditor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ test('"Save & test" should be successful when configuration is valid', async ({
configPage.datasource.uid,
configPage.datasource.id.toString()
)}/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();
});
Expand All @@ -20,14 +21,14 @@ test('"Save & test" should display success alert box when config is valid', asyn
createDataSourceConfigPage,
readProvisionedDataSource,
selectors,
}) => {
}) => {createDataSourceConfigPage

Check failure on line 24 in tests/configEditor.spec.ts

View workflow job for this annotation

GitHub Actions / Build, lint and unit tests

Expected an assignment or function call and instead saw an expression
const ds = await readProvisionedDataSource({ fileName: 'datasources.yml' });
const configPage = await createDataSourceConfigPage({ type: ds.type });
const healthCheckPath = `${selectors.apis.DataSource.proxy(
configPage.datasource.uid,
configPage.datasource.id.toString()
)}//api/v0/healthcheck`;
console.log("healthCheckPath: " +healthCheckPath)
)}/api/v0/healthcheck`;
console.log("test2: healthCheckPath: " +healthCheckPath)
await expect(configPage.saveAndTest({ path: healthCheckPath })).not.toBeOK();
expect(configPage).toHaveAlert('error');
});

0 comments on commit d95074e

Please sign in to comment.