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

Backport runtests.py modifications from develop to 2018.3 #50182

Merged
merged 50 commits into from Oct 29, 2018

Conversation

Projects
None yet
5 participants
@terminalmage
Copy link
Contributor

commented Oct 23, 2018

This will allow us to run only the tests corresponding to the files that were changed, on PRs opened against 2018.3 (and Fluorine, once merged forward)

Refs: #50050

terminalmage added some commits Apr 25, 2018

Add --from-filenames and --filename-map options to parser
This allows for the passed filename(s) to decide which tests are run
Don't run unit or integration tests unnecessarily
If --from-filenames (and optionally --filename-map) yield no matches,
this will keep from running the entire unit/integration suite.
Enhancements to --from-filenames, --filename-map options
This commit adds the following features:

- Changes to test modules are identified, and those tests are added to
  the list of tests to be run
- expr_match is used to allow the filename map to use either globbing or
  regular expressions
- Corresponding state tests are added when doing filename matches,
  meaning that for example the git state tests will be run when the git
  execution module is in the --from-filenames list
Don't import old module name
We'll handle the old name when backporting
Rename providers to clouds to respect naming convention
Also, move rackspace openstack-based tests to test_openstack.py

@rallytime rallytime requested review from gtmanfred and rallytime Oct 23, 2018

@gtmanfred

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2018

You will probably want to backport this one as well 8a6692d

@gtmanfred

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2018

so that it runs the filemaps in this pr and we can verify.

@terminalmage

This comment has been minimized.

Copy link
Contributor Author

commented Oct 23, 2018

@gtmanfred will that one commit there turn on the filename-based testing right away, or do you also need to make changes in .ci/ as well?

@gtmanfred

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2018

That is the only one needed, nothing from .ci/ was changed for this.

@rallytime
Copy link
Contributor

left a comment

In addition to the commit needed that @gtmanfred mentioned above, it looks like some of the test module renames (or new tests not in 2018.3?) need to be addressed. (See the lint failure.)

rallytime and others added some commits Oct 25, 2018

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Oct 25, 2018

OK, i fixed up those lint failures and added the commit from @gtmanfred so we can keep this moving. 😄

Let's see how this test run goes!

rallytime and others added some commits Oct 26, 2018

Add init file back in for integration/cloud/clouds pkg
This was accdientally removed during some cloud test file renaming, which
prevents the test from running due to an ImportError
Remove test_error from scheduler tests
These tests are not present on 2018.3
Remove "test_custom" from grains section of filename_map
This test is for functionality only available in fluorine and newer.

Removing this for 2018.3.
Remove pgjsonb returner unit tests
The tests that are written in this file are for functions not present
in the 2018.3 branch.

This commit will need to be reverted in the merge-forward to `fluorine`.
Rename states/test_libvirt.py into states/test_virt.py
Modules test files are named after the module itself, the state virt
module needs to comply with that rule too.
Add init file back in for unit/client pkg
This file was accidentally removed during some test renaming. The absence
of this file prevents the test from running due to an ImportError.
Use get_config_dir() instead of self.config_dir
This attribute does not exist in the 2018.3 branch. Use the function
for now, and then change this back on the merge-forward.
Remove saltclass pillar unit test for list expansion
This test only applies to functionality present in Fluorine or newer.

This commit will need to be reverted again in the fluorine branch.
@rallytime

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2018

OK, the rest of the test failures should all be fixed up now. 🤞

@rallytime rallytime merged commit f7c2f04 into saltstack:2018.3 Oct 29, 2018

6 of 10 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
Details
jenkins/pr/py2-windows-2016 running py2-windows-2016...
Details
jenkins/pr/py3-windows-2016 running py3-windows-2016...
Details
WIP Ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details

@terminalmage terminalmage deleted the terminalmage:issue50050 branch Nov 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.