Skip to content

Commit

Permalink
Fix loggin message and add issue for extra escaping (#677)
Browse files Browse the repository at this point in the history
* Fix loggin message and add issue for extra escaping
ref: https://jira.percona.com/browse/PMM-12338
  • Loading branch information
saikumar-vs authored Jul 18, 2024
1 parent 03c366c commit 118a00f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/tests/pmm-server-only.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ test.describe('PMM Server CLI tests for Docker Environment Variables', async ()
});
removeList.push('PMM-T224');
// @ts-ignore
// Extra escaping due to bug# PMM-12450, remove once fixed.
await out.outContains('Configuration error: environment variable \\"DATA_RETENTION=48\\" has invalid duration 48.');
});

Expand All @@ -57,6 +58,7 @@ test.describe('PMM Server CLI tests for Docker Environment Variables', async ()
stopList.push('PMM-T225');
removeList.push('PMM-T225');
// @ts-ignore
// Extra escaping due to bug# PMM-12450, remove once fixed.
await out.outContains('Configuration warning: unknown environment variable \\"DATA_TENTION=48\\".');
});

Expand All @@ -73,7 +75,7 @@ test.describe('PMM Server CLI tests for Docker Environment Variables', async ()
await waitForApiReady('127.0.0.1', 83);
await (await cli.exec('docker ps | grep PMM-T226')).assertSuccess();
await expect(async () => {
const out = await cli.exec('docker logs PMM-T226 2>&1 | grep "WARN"');
const out = await cli.exec('docker logs PMM-T226 2>&1 | grep "warning"');
await out.exitCodeEquals(1);
}).toPass({
// Probe, wait 1s, probe, wait 2s, probe, wait 2s, probe, wait 2s, probe, ....
Expand All @@ -82,7 +84,7 @@ test.describe('PMM Server CLI tests for Docker Environment Variables', async ()
});

await expect(async () => {
const out = await cli.exec('docker logs PMM-T226 2>&1 | grep "ERRO"');
const out = await cli.exec('docker logs PMM-T226 2>&1 | grep "error"');
await out.exitCodeEquals(1);
}).toPass({
// Probe, wait 1s, probe, wait 2s, probe, wait 2s, probe, wait 2s, probe, ....
Expand Down

0 comments on commit 118a00f

Please sign in to comment.