mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-26 09:55:52 +00:00
Add playwright test for healthcheck (#17542)
* add tests in playwright * refactor: remove unused changes * refcator: remove yarn lock change
This commit is contained in:
parent
e4927373bb
commit
cf347adf72
@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2024 Collate.
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import { interceptURL, verifyResponseStatusCode } from '../../common/common';
|
|
||||||
import { GlobalSettingOptions } from '../../constants/settings.constant';
|
|
||||||
|
|
||||||
describe('Health Check for Openmetadata', () => {
|
|
||||||
before(() => {
|
|
||||||
cy.login();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('All 5 checks should be successful', () => {
|
|
||||||
interceptURL('GET', '/api/v1/system/status', 'getOMStatus');
|
|
||||||
|
|
||||||
cy.settingClick(GlobalSettingOptions.OM_HEALTH);
|
|
||||||
|
|
||||||
verifyResponseStatusCode('@getOMStatus', 200);
|
|
||||||
|
|
||||||
cy.get('[data-testid="database"] .success-status').should(
|
|
||||||
'have.text',
|
|
||||||
'Success'
|
|
||||||
);
|
|
||||||
cy.get('[data-testid="searchInstance"] .success-status').should(
|
|
||||||
'have.text',
|
|
||||||
'Success'
|
|
||||||
);
|
|
||||||
cy.get('[data-testid="pipelineServiceClient"] .success-status').should(
|
|
||||||
'have.text',
|
|
||||||
'Success'
|
|
||||||
);
|
|
||||||
cy.get('[data-testid="jwks"] .success-status').should(
|
|
||||||
'have.text',
|
|
||||||
'Success'
|
|
||||||
);
|
|
||||||
cy.get('[data-testid="migrations"] .success-status').should(
|
|
||||||
'have.text',
|
|
||||||
'Success'
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2024 Collate.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
import { expect, test } from '@playwright/test';
|
||||||
|
import { GlobalSettingOptions } from '../../constant/settings';
|
||||||
|
import { redirectToHomePage } from '../../utils/common';
|
||||||
|
import { settingClick } from '../../utils/sidebar';
|
||||||
|
|
||||||
|
// use the admin user to login
|
||||||
|
test.use({ storageState: 'playwright/.auth/admin.json' });
|
||||||
|
|
||||||
|
test.describe('Health Check for OpenMetadata', () => {
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
await redirectToHomePage(page);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('All 5 checks should be successful', async ({ page }) => {
|
||||||
|
const healthResponse = page.waitForResponse('/api/v1/system/status');
|
||||||
|
await settingClick(page, GlobalSettingOptions.OM_HEALTH);
|
||||||
|
|
||||||
|
await healthResponse;
|
||||||
|
|
||||||
|
await expect(
|
||||||
|
page.locator('[data-testid="database"] .success-status')
|
||||||
|
).toHaveText('Success');
|
||||||
|
await expect(
|
||||||
|
page.locator('[data-testid="searchInstance"] .success-status')
|
||||||
|
).toHaveText('Success');
|
||||||
|
await expect(
|
||||||
|
page.locator('[data-testid="pipelineServiceClient"] .success-status')
|
||||||
|
).toHaveText('Success');
|
||||||
|
await expect(
|
||||||
|
page.locator('[data-testid="jwks"] .success-status')
|
||||||
|
).toHaveText('Success');
|
||||||
|
await expect(
|
||||||
|
page.locator('[data-testid="migrations"] .success-status')
|
||||||
|
).toHaveText('Success');
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user