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

Create a wrapper that checks for the presence of state modules for tests #55707

Merged
merged 10 commits into from
Jan 9, 2020

Conversation

Akm0d
Copy link
Contributor

@Akm0d Akm0d commented Dec 20, 2019

What does this PR do?

Create a wrapper that checks for the presence of state modules for tests

@Akm0d Akm0d added the Tests label Dec 20, 2019
@Akm0d Akm0d added this to the Approved milestone Dec 20, 2019
@Akm0d Akm0d requested a review from s0undt3ch December 20, 2019 01:10
@Akm0d Akm0d requested a review from a team as a code owner December 20, 2019 01:10
@Akm0d Akm0d self-assigned this Dec 20, 2019
tests/support/helpers.py Outdated Show resolved Hide resolved
@Akm0d
Copy link
Contributor Author

Akm0d commented Dec 23, 2019

re-run full all

@codecov
Copy link

codecov bot commented Dec 24, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@a767662). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #55707   +/-   ##
=========================================
  Coverage          ?   17.02%           
=========================================
  Files             ?     1193           
  Lines             ?   223277           
  Branches          ?    47878           
=========================================
  Hits              ?    37996           
  Misses            ?   182507           
  Partials          ?     2774
Flag Coverage Δ
#archlts 16.14% <ø> (?)
#centos7 23.74% <ø> (?)
#proxy 23.77% <ø> (?)
#py2 16.88% <ø> (?)
#py3 23.06% <ø> (?)
#runtests 17.02% <ø> (?)
#ubuntu1604 23.71% <ø> (?)
#zeromq 17.02% <ø> (?)

tests/integration/states/test_pkg.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 3, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@97664b3). Click here to learn what that means.
The diff coverage is 14.74%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #55707   +/-   ##
=========================================
  Coverage          ?   16.38%           
=========================================
  Files             ?     1171           
  Lines             ?   220944           
  Branches          ?    48627           
=========================================
  Hits              ?    36175           
  Misses            ?   182374           
  Partials          ?     2395
Flag Coverage Δ
#amazon1 15.99% <14.74%> (?)
#centos8 15.83% <14.74%> (?)
#fedora30 16.15% <14.74%> (?)
#py2 16.22% <14.74%> (?)
#py3 15.83% <14.74%> (?)
#runtests 16.38% <14.74%> (?)
#zeromq 16.38% <14.74%> (?)
Impacted Files Coverage Δ
salt/modules/zfs.py 12.41% <ø> (ø)
salt/log/setup.py 25.84% <ø> (ø)
salt/states/virt.py 11.41% <ø> (ø)
salt/states/pkg.py 8.09% <ø> (ø)
salt/states/network.py 6.49% <ø> (ø)
salt/states/mount.py 2.89% <ø> (ø)
salt/states/pkgrepo.py 7.26% <ø> (ø)
salt/modules/mount.py 10.74% <0%> (ø)
salt/loader.py 56.1% <100%> (ø)
salt/modules/nova.py 33.34% <100%> (ø)
... and 12 more

@codecov
Copy link

codecov bot commented Jan 3, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@97664b3). Click here to learn what that means.
The diff coverage is 14.74%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #55707   +/-   ##
=========================================
  Coverage          ?   16.44%           
=========================================
  Files             ?     1171           
  Lines             ?   220944           
  Branches          ?    48627           
=========================================
  Hits              ?    36318           
  Misses            ?   182172           
  Partials          ?     2454
Flag Coverage Δ
#amazon1 15.99% <14.74%> (?)
#centos8 15.83% <14.74%> (?)
#fedora30 16.21% <14.74%> (?)
#py2 16.28% <14.74%> (?)
#py3 15.83% <14.74%> (?)
#runtests 16.44% <14.74%> (?)
#zeromq 16.44% <14.74%> (?)
Impacted Files Coverage Δ
salt/modules/zfs.py 12.41% <ø> (ø)
salt/log/setup.py 25.84% <ø> (ø)
salt/states/virt.py 11.41% <ø> (ø)
salt/states/pkg.py 15.71% <ø> (ø)
salt/states/network.py 6.49% <ø> (ø)
salt/states/mount.py 2.89% <ø> (ø)
salt/states/pkgrepo.py 7.26% <ø> (ø)
salt/modules/mount.py 10.74% <0%> (ø)
salt/loader.py 56.1% <100%> (ø)
salt/modules/nova.py 33.34% <100%> (ø)
... and 12 more

 - created requires_salt_state_module
 - corrected misuse of requires_salt_module to use the new function
 - eliminated pre_grains and loaded real grains before the test starts
 - Various fixes to get the pkg tests actually running as they were skipped before
 - Skipped tests when requisite packages weren't available
@Akm0d Akm0d requested a review from s0undt3ch January 3, 2020 11:50
@Akm0d Akm0d force-pushed the requires_salt_state_modules branch from d8a2c4f to 9e31aa4 Compare January 3, 2020 11:51
tests/integration/modules/test_pkg.py Outdated Show resolved Hide resolved
tests/integration/states/test_pkg.py Show resolved Hide resolved
tests/integration/states/test_pkg.py Outdated Show resolved Hide resolved
tests/support/helpers.py Outdated Show resolved Hide resolved
tests/support/helpers.py Outdated Show resolved Hide resolved
tests/support/helpers.py Outdated Show resolved Hide resolved
@Akm0d
Copy link
Contributor Author

Akm0d commented Jan 7, 2020

re-run full windows2019

@Akm0d Akm0d requested review from s0undt3ch and dwoz January 7, 2020 17:11
@terminalmage
Copy link
Contributor

This PR caused several tests to always be skipped. I discovered this while writing another test earlier tonight. Details are in #56681, and I've fixed the problem there.

Just a friendly reminder that whenever changes are made to test skipping behavior, it's that much more important to closely check the results for the affected tests, on all platforms, and not to assume that everything is OK because tests are green. 😃

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

Successfully merging this pull request may close these issues.

5 participants