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

Fix loggin message and add issue for extra escaping #677

Merged
merged 6 commits into from
Jul 18, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cli/tests/pmm-server-docker-generic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ test.describe('PMM Server CLI tests for Docker Environment Variables', async ()
intervals: [1_000, 2_000, 2_000],
timeout: 60_000
});
// Extra escaping due to bug# PMM-12450, remove once fixed.
await out.outContains('Configuration error: environment variable \\"DATA_RETENTION=48\\" has invalid duration 48.')
await (await cli.exec('docker rm PMM-T224')).assertSuccess();
});
Expand All @@ -42,7 +43,7 @@ test.describe('PMM Server CLI tests for Docker Environment Variables', async ()
intervals: [1_000, 2_000, 2_000],
timeout: 60_000
});

// Extra escaping due to bug# PMM-12450, remove once fixed.
await out.outContains('Configuration warning: unknown environment variable \\"DATA_TENTION=48\\".')
await (await cli.exec('docker stop PMM-T225')).assertSuccess();
await (await cli.exec('docker rm PMM-T225')).assertSuccess();
Expand All @@ -59,7 +60,7 @@ test.describe('PMM Server CLI tests for Docker Environment Variables', async ()
await cli.exec('sleep 20');
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 @@ -68,7 +69,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
Loading