[Obs Onboarding] [Ensemble Test] Run OTel collector in the background (#212255)

Right now OTel test fails in Ensemble because it waits for the collector
to exit before proceeding which never happens because collector runs on
the foreground. This change forces the collector to run in the
background and also redirects its logs into a dedicated file to make the
test output more clear.

[Successful run of the Nightly
job](3771906587)
🔒
This commit is contained in:
Mykola Harmash 2025-02-28 11:08:25 +01:00 committed by GitHub
parent a5c35b80a4
commit 8fe5d7f94b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,7 @@ test('Otel Host', async ({ page, onboardingHomePage, otelHostFlowPage, hostsOver
await otelHostFlowPage.copyCollectorStartSnippetToClipboard();
const collectorStartSnippet = (await page.evaluate('navigator.clipboard.readText()')) as string;
const codeSnippet = `${collectorDownloadSnippet}\n${collectorStartSnippet}`;
const codeSnippet = `${collectorDownloadSnippet}\n${collectorStartSnippet} > collector-output.log 2>&1 &`;
/**
* Ensemble story watches for the code snippet file