Skip to content

Commit

Permalink
[plugin-helpers] Skip build.test.ts log matching on ci-stats service (#…
Browse files Browse the repository at this point in the history
…127560) (#127602)

This copies the fix over from
#123510 to be used in both
plugin-helpers build calls.

Closes #89079

(cherry picked from commit 371c52a)

Co-authored-by: Jonathan Budzenski <jon@elastic.co>
  • Loading branch information
kibanamachine and jbudz committed Mar 14, 2022
1 parent 61d1fc1 commit d2d7763
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/kbn-plugin-helpers/src/integration_tests/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@ it('builds a generated plugin into a viable archive', async () => {
all: true,
}
);
const filterLogs = (logs: string | undefined) => {
return logs
?.split('\n')
.filter((l) => !l.includes('failed to reach ci-stats service'))
.join('\n');
};

expect(generateProc.all).toMatchInlineSnapshot(`
expect(filterLogs(generateProc.all)).toMatchInlineSnapshot(`
" succ 🎉
Your plugin has been created in plugins/foo_test_plugin
Expand All @@ -60,12 +66,7 @@ it('builds a generated plugin into a viable archive', async () => {
}
);

expect(
buildProc.all
?.split('\n')
.filter((l) => !l.includes('failed to reach ci-stats service'))
.join('\n')
).toMatchInlineSnapshot(`
expect(filterLogs(buildProc.all)).toMatchInlineSnapshot(`
" info deleting the build and target directories
info running @kbn/optimizer
│ info initialized, 0 bundles cached
Expand Down

0 comments on commit d2d7763

Please sign in to comment.