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

e2e: check if cri-resmgr is expected to run with different policy #890

Merged
merged 1 commit into from Sep 8, 2022

Conversation

askervin
Copy link
Contributor

@askervin askervin commented Sep 8, 2022

E2E tests generally avoid restarting cri-resmgr for faster execution. This causes false FAILs when the same vm runs one test from policy A followed by another test from policy B without forced cri-resmgr restarting. This patch adds a script that run_tests.sh imports automatically when running any test from the policies test suite. The script checks if vm is running cri-resmgr with different policy than what next test expects, and if so, restarts cri-resmgr with cache cleared when needed.

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2022

Codecov Report

Merging #890 (5ca93ae) into master (d992ea4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #890   +/-   ##
=======================================
  Coverage   34.89%   34.89%           
=======================================
  Files          60       60           
  Lines        8869     8869           
=======================================
  Hits         3095     3095           
  Misses       5472     5472           
  Partials      302      302           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

jukkar
jukkar previously approved these changes Sep 8, 2022
Copy link
Contributor

@jukkar jukkar left a comment

Choose a reason for hiding this comment

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

Tested the change and it works ok.

klihub
klihub previously approved these changes Sep 8, 2022
Copy link
Contributor

@klihub klihub left a comment

Choose a reason for hiding this comment

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

I had one nitpick, which is not a showstopper by any means. LGTM also in its current form if you want to stick with awk.

E2E tests generally avoid restarting cri-resmgr for faster
execution. This causes false FAILs when the same vm runs one test from
policy A followed by another test from policy B without forced
cri-resmgr restarting. This patch adds a script that run_tests.sh
imports automatically when running any test from the policies test
suite. The script checks if vm is running cri-resmgr with different
policy than what next test expects, and if so, restarts cri-resmgr
with cache cleared when needed.
@askervin askervin dismissed stale reviews from klihub and jukkar via 5ca93ae September 8, 2022 13:25
@askervin askervin force-pushed the 5Kh_e2e_reset_if_policy_changed branch from d6c6d54 to 5ca93ae Compare September 8, 2022 13:25
@klihub klihub merged commit 46c6048 into intel:master Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants