Skip to content

Commit

Permalink
Updates to fix status change and patterns with extra spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumar-vs committed Nov 13, 2024
1 parent e1726cc commit 4c95001
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/tests/help.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ test.describe('PMM Client "--help" validation', async () => {
test('run pmm-admin --help to check if Annotation exist in help output', async ({}) => {
const output = await cli.execSilent('sudo pmm-admin --help');
await output.assertSuccess();
await output.outContains('annotate Add an annotation to Grafana charts');
await output.outContains('annotate Add an annotation to Grafana charts');
});

/**
Expand Down
8 changes: 4 additions & 4 deletions cli/tests/postgreSql-pdpgsql.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test.describe('Percona Distribution for PostgreSQL CLI tests', async () => {
await cli.exec('sleep 30');
const output = await cli.exec('sudo pmm-admin inventory list agents');
await output.assertSuccess();
await output.outContains('postgres_exporter Running');
await output.outContains('postgres_exporter Running');
await output.outContains('postgresql_pgstatmonitor_agent Running');
});

Expand Down Expand Up @@ -122,8 +122,8 @@ test.describe('Percona Distribution for PostgreSQL CLI tests', async () => {
test('PMM-T442 run pmm-admin inventory list agents for check agent postgresql_pgstatements_agent', async ({}) => {
const output = await cli.exec('sudo pmm-admin inventory list agents');
await output.assertSuccess();
await output.outContains('postgres_exporter Running');
await output.outContains('postgresql_pgstatements_agent Running');
await output.outContains('postgres_exporter Running');
await output.outContains('postgresql_pgstatements_agent Running');
});

/**
Expand Down Expand Up @@ -231,7 +231,7 @@ test.describe('Percona Distribution for PostgreSQL CLI tests', async () => {
const serviceIds = jsonList.service.filter((s: { service_name: string; }) => serviceNames.includes(s.service_name)).map((s: { service_id: never; }) => s.service_id);
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
agentIds = jsonList.agent.filter((a: { agent_type: string; status: string; service_id: string | null }) => a.agent_type === 'AGENT_TYPE_POSTGRES_EXPORTER'
&& a.status === 'AGENT_STATUS_RUNNING'
&& a.status === 'RUNNING'
&& serviceIds.includes(a.service_id)).map((a: { agent_id: string }) => a.agent_id);

expect(agentIds.length).toBeTruthy();
Expand Down

0 comments on commit 4c95001

Please sign in to comment.