Skip to content

Commit

Permalink
[8.x] [Fleet] unskip flaky test (#196806) (#196907)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Fleet] unskip flaky test
(#196806)](#196806)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T15:02:11Z","message":"[Fleet]
unskip flaky test (#196806)\n\n## Summary\r\n\r\nUnskip flaky
tests\r\n\r\nCouldn't reproduce the failure in a few runs, the flaky
test runner\r\ndoesn't support running Jest tests.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196463\r\nCloses
https://github.com/elastic/kibana/issues/196464\r\nCloses
https://github.com/elastic/kibana/issues/196465\r\nCloses
https://github.com/elastic/kibana/issues/196466\r\nCloses
https://github.com/elastic/kibana/issues/196467\r\nCloses
https://github.com/elastic/kibana/issues/196468\r\nCloses
https://github.com/elastic/kibana/issues/196469\r\n\r\nCloses
https://github.com/elastic/kibana/issues/192798\r\nCloses
https://github.com/elastic/kibana/issues/189004","sha":"d2ee4075db1a577213af2d8450240d88a4d570d4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor"],"title":"[Fleet]
unskip flaky
test","number":196806,"url":"https://github.com/elastic/kibana/pull/196806","mergeCommit":{"message":"[Fleet]
unskip flaky test (#196806)\n\n## Summary\r\n\r\nUnskip flaky
tests\r\n\r\nCouldn't reproduce the failure in a few runs, the flaky
test runner\r\ndoesn't support running Jest tests.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196463\r\nCloses
https://github.com/elastic/kibana/issues/196464\r\nCloses
https://github.com/elastic/kibana/issues/196465\r\nCloses
https://github.com/elastic/kibana/issues/196466\r\nCloses
https://github.com/elastic/kibana/issues/196467\r\nCloses
https://github.com/elastic/kibana/issues/196468\r\nCloses
https://github.com/elastic/kibana/issues/196469\r\n\r\nCloses
https://github.com/elastic/kibana/issues/192798\r\nCloses
https://github.com/elastic/kibana/issues/189004","sha":"d2ee4075db1a577213af2d8450240d88a4d570d4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196806","number":196806,"mergeCommit":{"message":"[Fleet]
unskip flaky test (#196806)\n\n## Summary\r\n\r\nUnskip flaky
tests\r\n\r\nCouldn't reproduce the failure in a few runs, the flaky
test runner\r\ndoesn't support running Jest tests.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196463\r\nCloses
https://github.com/elastic/kibana/issues/196464\r\nCloses
https://github.com/elastic/kibana/issues/196465\r\nCloses
https://github.com/elastic/kibana/issues/196466\r\nCloses
https://github.com/elastic/kibana/issues/196467\r\nCloses
https://github.com/elastic/kibana/issues/196468\r\nCloses
https://github.com/elastic/kibana/issues/196469\r\n\r\nCloses
https://github.com/elastic/kibana/issues/192798\r\nCloses
https://github.com/elastic/kibana/issues/189004","sha":"d2ee4075db1a577213af2d8450240d88a4d570d4"}}]}]
BACKPORT-->

Co-authored-by: Julia Bardi <[email protected]>
  • Loading branch information
kibanamachine and juliaElastic authored Oct 18, 2024
1 parent 559484c commit ed3a8de
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ const TEST_IDS = {
VALUE_INPUT: 'globalDataTagsValueInput',
};

// Failing: See https://github.com/elastic/kibana/issues/192798
describe.skip('GlobalDataTagsTable', () => {
describe('GlobalDataTagsTable', () => {
let renderResult: RenderResult;
let mockUpdateAgentPolicy: jest.Mock;
const globalDataTags: GlobalDataTag[] = [
Expand All @@ -49,8 +48,7 @@ describe.skip('GlobalDataTagsTable', () => {
React.ComponentProps<typeof GlobalDataTagsTable>['updateAgentPolicy']
>((policy) => {
mockUpdateAgentPolicy(policy);
// @ts-expect-error - TODO: fix this, types do not match
_updateAgentPolicy(policy);
_updateAgentPolicy({ ...policy, global_data_tags: policy.global_data_tags ?? [] });
}, []);

return (
Expand Down Expand Up @@ -127,7 +125,7 @@ describe.skip('GlobalDataTagsTable', () => {
{ name: 'newTag2', value: '123 123' },
],
});
});
}, 10000);

it('should edit an existing tag', async () => {
renderComponent(globalDataTags);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,7 @@ afterAll(() => {
consoleDebugMock.mockRestore();
});

// FLAKY: https://github.com/elastic/kibana/issues/196463
// FLAKY: https://github.com/elastic/kibana/issues/196464
// FLAKY: https://github.com/elastic/kibana/issues/196465
// FLAKY: https://github.com/elastic/kibana/issues/196466
// FLAKY: https://github.com/elastic/kibana/issues/196467
// FLAKY: https://github.com/elastic/kibana/issues/196468
// FLAKY: https://github.com/elastic/kibana/issues/196469
describe.skip('When on the package policy create page', () => {
describe('When on the package policy create page', () => {
afterEach(() => {
jest.clearAllMocks();
});
Expand Down Expand Up @@ -212,6 +205,7 @@ describe.skip('When on the package policy create page', () => {
data_streams: [
{
type: 'logs',
name: 'access logs',
dataset: 'nginx.access',
title: 'Nginx access logs',
ingest_pipeline: 'default',
Expand Down Expand Up @@ -306,7 +300,7 @@ describe.skip('When on the package policy create page', () => {
test('should use custom "cancel" URL', () => {
expect(cancelLink.href).toBe(expectedRouteState.onCancelUrl);
expect(cancelButton.href).toBe(expectedRouteState.onCancelUrl);
});
}, 10000);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ jest.mock('../hooks', () => ({
}),
}));

// FLAKY: https://github.com/elastic/kibana/issues/189004
describe.skip('ManageAgentPoliciesModal', () => {
describe('ManageAgentPoliciesModal', () => {
let testRenderer: TestRenderer;
const mockOnClose = jest.fn();
const mockPolicies = [{ name: 'Test policy', revision: 2, id: 'policy1' }] as AgentPolicy[];
Expand Down Expand Up @@ -115,7 +114,7 @@ describe.skip('ManageAgentPoliciesModal', () => {
expect(usePackagePolicyWithRelatedData('', {}).savePackagePolicy).toHaveBeenCalledWith({
policy_ids: ['policy1', 'policy2'],
});
});
}, 10000);

it('should keep managed policy when policies are changed', async () => {
(useGetAgentPolicies as jest.Mock).mockReturnValue({
Expand Down

0 comments on commit ed3a8de

Please sign in to comment.