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

Add pkg.latest_version windows test #47668

Merged
merged 1 commit into from May 21, 2018

Conversation

Projects
None yet
5 participants
@Ch3LL
Contributor

Ch3LL commented May 15, 2018

What does this PR do?

make sure the test test_pkg_latest_version can run on windows as well

What issues does this PR fix or reference?

#45004

@rallytime rallytime requested review from dwoz and twangboy May 16, 2018

@dwoz

dwoz approved these changes May 16, 2018

@rallytime

This comment has been minimized.

Contributor

rallytime commented May 16, 2018

@Ch3LL Can you check and see if this test failure for CentOS 7 is correct?

  • integration.modules.test_pkg.PkgModuleTest.test_pkg_upgrade_has_pending_upgrades

I don't recall if that one is failing elsewhere or not, but it seems that it could be related to this change.

https://jenkins.saltstack.com/job/PR/job/salt-pr-linode-cent7-py3/4933/

@damon-atkins

This comment has been minimized.

Member

damon-atkins commented May 17, 2018

To test pkg.x states would it not be best to develop some fake bits of software.
e.g. rpm called salt-package-test 1.0 and 1.6 and 2.0z etc. and for windows develop some fake msi

Both only install a flag file or something so you can test the install work and the removed worked. Or test for corner cases.

In Windows lots of software does weird stuff. Hence need to test with various software, which can take a fair bit of time to install end removed during testing.

@Ch3LL

This comment has been minimized.

Contributor

Ch3LL commented May 17, 2018

@damon-atkins can you clarify In Windows lots of software does weird stuff and why that would impact testing if putty was installed/removed.

@rallytime i'm not seeing how that would impact that test. i'm not even touching that test and on the linux side of things i just changed the multiple references from htop to a variable, i didn't change anything else on the linux side of the test. I also checked and htop is not being tested in that test so i'm pretty certain this new test is not the cause of that failure.

@Ch3LL

This comment has been minimized.

Contributor

Ch3LL commented May 17, 2018

talked with @rallytime offline and I will try to test tomorrow to triple check that this test isn't impacting the other :)

@damon-atkins

This comment has been minimized.

Member

damon-atkins commented May 17, 2018

What I am saying its not a very good test. Salt Team would be better off developing its own test rpm and and own windows installers to test version comparison, latest install etc. Rather than be dependant on real software packages. If you have more control of what is being installed both good & bad and ugly , you can check better and get better test coverage.

Its just a suggestion. Windows has semi defined standard which is not always followed, in comparison to an rpm. Hence the comment about "weird stuff". esp windows where you need fair few software packages to get good test coverage, and they can take fair amount of time to install/remove/upgrade compare to a "small package" developed by salt team. (if that was to happen)

I run over a 100 salt-call commands to test win_pkg execution module, which involves 6 different software packages.

@Ch3LL

This comment has been minimized.

Contributor

Ch3LL commented May 17, 2018

awesome thanks for elaborating @damon-atkins . I agree we could get a lot more flexibility and speed using custom packages. I was asking about the putty install just to make sure I wouldn't be missing something if we did merge this.

I will ago ahead and open an issue when I get back to this PR tomorrow to add custom packages to our test infrastructure but I think its okay to merge this when its ready and add the custom packages later :)

@Ch3LL

This comment has been minimized.

Contributor

Ch3LL commented May 21, 2018

I was not able to replicate the test failure using the same VMs the PR test runs use:

[root@ip-10-0-0-55 testing]# python3 tests/runtests.py -n integration.modules.test_pkg --run-destructive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Python Version: 3.4.8 (default, Mar 23 2018, 10:04:27) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
 * Transplanting configuration files to '/tmp/salt-tests-tmpdir/config'
 * Current Directory: /testing
 * Test suite is running under PID 18769
 * Logging tests on /tmp/salt-runtests.log
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Max open files settings is too low (soft: 1024, hard: 4096) for running the tests
 * Trying to raise the limits to soft: 3072, hard: 4096
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Setting up Salt daemons to execute tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Starting salt-master ... STARTED!
 * Starting salt-minion ... STARTED!
 * Starting sub salt-minion ... STARTED!
 * Starting syndic salt-master ... STARTED!
 * Starting salt-syndic ... STARTED!
=======================================================================================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Starting integration.modules.test_pkg Tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
........ss
----------------------------------------------------------------------
Ran 10 tests in 297.955s

OK (skipped=2)

===============================================================  Overall Tests Report  ================================================================
*** integration.modules.test_pkg Tests  ***************************************************************************************************************
 --------  Skipped Tests  -----------------------------------------------------------------------------------------------------------------------------
   -> integration.modules.test_pkg.PkgModuleTest.test_refresh_db   ->  WARNING(SHOULD NOT HAPPEN #1935): Failed to get 'pkg.refresh_db' from the minion 'minion'. Command output: {'minion': None}
   -> integration.modules.test_pkg.PkgModuleTest.test_version_cmp  ->  pkg.version_cmp is unavailable on RedHat
 ------------------------------------------------------------------------------------------------------------------------------------------------------
=======================================================================================================================================================
OK (total=10, skipped=2, passed=8, failures=0, errors=0)
===============================================================  Overall Tests Report  ================================================================

i'll restart the tests to make sure this is the case.

@Ch3LL

This comment has been minimized.

Contributor

Ch3LL commented May 21, 2018

re-run py3

@rallytime rallytime merged commit f45a96b into saltstack:2017.7 May 21, 2018

5 of 9 checks passed

default Build finished.
Details
jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #5099 — FAILURE
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #10069 — FAILURE
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #18990 — FAILURE
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #25289 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #17220 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #22867 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #21850 — SUCCESS
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment