Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-T2261 - Verify Postgresql Dashboard Instance Summary has Data with socket based service #658

Merged
merged 6 commits into from
Jul 26, 2023
22 changes: 22 additions & 0 deletions tests/qa-integration/pmm_pgsm_integration_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const version = process.env.PGSQL_VERSION ? `${process.env.PGSQL_VERSION}` : '14
const container = process.env.PGSQL_PGSM_CONTAINER ? `${process.env.PGSQL_PGSM_CONTAINER}` : 'pgsql_pgsm';
const database = `pgsm${Math.floor(Math.random() * 99) + 1}`;
const pgsm_service_name = `${container}_${version}_service`;
const pgsm_service_name_socket = `socket_${container}_${version}_service`;
const container_name = `${container}_${version}`;
const percentageDiff = (a, b) => (a - b === 0 ? 0 : 100 * Math.abs((a - b) / b));

Expand Down Expand Up @@ -175,6 +176,27 @@ Scenario(
},
);

Scenario(
'PMM-T2261 - Verify Postgresql Dashboard Instance Summary has Data with socket based service and Agent log @not-ui-pipeline @pgsm-pmm-integration',
async ({
I, dashboardPage, adminPage,
}) => {
I.amOnPage(dashboardPage.postgresqlInstanceSummaryDashboard.url);
dashboardPage.waitForDashboardOpened();
await dashboardPage.applyFilter('Service Name', pgsm_service_name_socket);
await dashboardPage.expandEachDashboardRow();
I.click(adminPage.fields.metricTitle);
adminPage.performPageDown(5);
adminPage.performPageUp(5);
dashboardPage.verifyMetricsExistence(dashboardPage.postgresqlInstanceSummaryDashboard.metrics);
await dashboardPage.verifyThereAreNoGraphsWithNA();
await dashboardPage.verifyThereAreNoGraphsWithoutData(1);
let log = await I.verifyCommand(`docker exec ${container_name} cat pmm-agent.log`);
I.assertFalse(log.includes('Error opening connection to database \(postgres'),
'The log wasn\'t supposed to contain errors regarding connection to postgress database but it does')
},
);

// The numbers don't entirely match, we need to find a way to track based on difference
Scenario(
'PMM-T1259 - Verifying data in Clickhouse and comparing with PGSM output @pgsm-pmm-integration @not-ui-pipeline',
Expand Down
Loading