-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dac0a2d
commit 35dbb76
Showing
2 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,31 +115,3 @@ test.describe('PMM Client "--help" validation', async () => { | |
]); | ||
}); | ||
}); | ||
|
||
test.describe('-promscrape.maxScapeSize tests', async () => { | ||
test.beforeAll(async () => { | ||
await (await cli.exec(`docker-compose -f test-setup/docker-compose-scrape-intervals.yml up -d`)).assertSuccess(); | ||
}) | ||
|
||
test.afterAll(async () => { | ||
await (await cli.exec(`docker-compose -f test-setup/docker-compose-scrape-intervals.yml down`)).assertSuccess(); | ||
}) | ||
|
||
test('@PMM-T1665 Verify custom value for vm_agents -promscrape.maxScapeSize parameter', async ({page}) => { | ||
const customScrapeSize = '128'; | ||
|
||
await test.step('verify client docker logs for custom value', async () => { | ||
await page.waitForTimeout(10_000); | ||
const scrapeSizeLog = await cli.exec('docker logs pmm-client-custom-scrape-interval 2>&1 | grep \'promscrape.maxScrapeSize.*vm_agent\' | tail -1'); | ||
await scrapeSizeLog.outContains(`promscrape.maxScrapeSize=\\\"${customScrapeSize}MiB\\\"`) | ||
}) | ||
|
||
await test.step('verify logs from binary for custom value', async () => { | ||
await (await cli.exec('sudo pmm-admin config --force \'--server-url=https://admin:[email protected]:2443\' --server-insecure-tls 127.0.0.1')).assertSuccess() | ||
|
||
await page.waitForTimeout(10_000); | ||
const scrapeSizeLog = await cli.exec('ps aux | grep -v \'grep\' | grep \'vm_agent\' | tail -1') | ||
await scrapeSizeLog.outContains(`promscrape.maxScrapeSize=${customScrapeSize}MiB`) | ||
}) | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,3 +123,32 @@ test.describe('PMM Server CLI tests for Docker Environment Variables', async () | |
expect(output.getStdOutLines()[3], `Verify Clickhouse metadata_path contains "${expectedPath}"`).toContain(expectedPath); | ||
}); | ||
}); | ||
|
||
test.describe('-promscrape.maxScapeSize tests', async () => { | ||
test.beforeAll(async () => { | ||
await (await cli.exec(`docker-compose -f test-setup/docker-compose-scrape-intervals.yml up -d`)).assertSuccess(); | ||
}) | ||
|
||
test.afterAll(async () => { | ||
await (await cli.exec(`docker-compose -f test-setup/docker-compose-scrape-intervals.yml down`)).assertSuccess(); | ||
await (await cli.exec(`sudo pmm-admin config --force \'--server-url=https://admin:[email protected]:443\' --server-insecure-tls 127.0.0.1 || true`)).assertSuccess(); | ||
}) | ||
|
||
test('@PMM-T1665 Verify custom value for vm_agents -promscrape.maxScapeSize parameter', async ({page}) => { | ||
const customScrapeSize = '128'; | ||
|
||
await test.step('verify client docker logs for custom value', async () => { | ||
await page.waitForTimeout(10_000); | ||
const scrapeSizeLog = await cli.exec('docker logs pmm-client-custom-scrape-interval 2>&1 | grep \'promscrape.maxScrapeSize.*vm_agent\' | tail -1'); | ||
await scrapeSizeLog.outContains(`promscrape.maxScrapeSize=\\\"${customScrapeSize}MiB\\\"`) | ||
}) | ||
|
||
await test.step('verify logs from binary for custom value', async () => { | ||
await (await cli.exec('sudo pmm-admin config --force \'--server-url=https://admin:[email protected]:2443\' --server-insecure-tls 127.0.0.1')).assertSuccess() | ||
|
||
await page.waitForTimeout(10_000); | ||
const scrapeSizeLog = await cli.exec('ps aux | grep -v \'grep\' | grep \'vm_agent\' | tail -1') | ||
await scrapeSizeLog.outContains(`promscrape.maxScrapeSize=${customScrapeSize}MiB`) | ||
}) | ||
}); | ||
}) |