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 tests to run sequentially by default #6121

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Conversation

Tostti
Copy link
Member

@Tostti Tostti commented Nov 14, 2023

Description

This PR aims to configure the tests to be ran sequentially by default. This is due to some tests failing when they are executed after a commit, causing the need to re run several times them.

Issues Resolved

#6107

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@Tostti Tostti requested a review from a team as a code owner November 14, 2023 12:51
Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 20.4% ( 183 / 897 )
Branches 18.07% ( 79 / 437 )
Functions 12.63% ( 36 / 285 )
Lines 20.59% ( 180 / 874 )

Copy link
Contributor

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.95% ( 167 / 217 )
Branches 54.63% ( 53 / 97 )
Functions 60.86% ( 28 / 46 )
Lines 76.95% ( 167 / 217 )

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 11.97% ( 4118 / 34379 )
Branches 8.15% ( 1886 / 23135 )
Functions 11.3% ( 925 / 8179 )
Lines 12.14% ( 4004 / 32966 )

@Tostti Tostti linked an issue Nov 14, 2023 that may be closed by this pull request
Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Tostti Tostti merged commit 2d4f2a0 into 4.8.0 Nov 14, 2023
6 checks passed
@Tostti Tostti deleted the 6107-fix-tests-on-commit branch November 14, 2023 13:04
Copy link
Contributor

The backport to 4.7.0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.7.0 4.7.0
# Navigate to the new working tree
cd .worktrees/backport-4.7.0
# Create a new branch
git switch --create backport-6121-to-4.7.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2d4f2a08d79e05cf2f9bb1d7d306cc60a81f5739
# Push it to GitHub
git push --set-upstream origin backport-6121-to-4.7.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.7.0

Then, create a pull request where the base branch is 4.7.0 and the compare/head branch is backport-6121-to-4.7.0.

Copy link
Contributor

The backport to 4.7.1 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.7.1 4.7.1
# Navigate to the new working tree
cd .worktrees/backport-4.7.1
# Create a new branch
git switch --create backport-6121-to-4.7.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2d4f2a08d79e05cf2f9bb1d7d306cc60a81f5739
# Push it to GitHub
git push --set-upstream origin backport-6121-to-4.7.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.7.1

Then, create a pull request where the base branch is 4.7.1 and the compare/head branch is backport-6121-to-4.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests are randomly failing on commit
2 participants