Commit graph

39 commits

Author SHA1 Message Date
Matt Martz
7cd080b10d
[stable-2.10] Update pip tests to omit install dev extras to avoid dep issues (#72436) (#72438)
(cherry picked from commit 2ee5af5)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-11-02 11:05:48 -06:00
Sam Doran
775d6e6752
[stable-2.10] Changes required for macOS 10.15 (#71841) (#71954)
* Use default group of staff on macos to prevent sudo issues
* Install gnu-tar for macos in git and unarchive tests
* Enable timezone module to support py3 on macos
* If the virtualenv command is missing, try python -m virtualenv
* Install passlib for filter_core on macos
* Install paramiko via pip on macos for paramiko tests
* Normalize discovered python interpreter on macos
* Get pip tests passing, by ensuring we have wheel installed
* Create /etc/ansible for ca certs on mac, list lookup_url as destructive
* Fixups for CA certs
* Include macos
* Dynamically get cafile instead of hardcoding the path
(cherry picked from commit 35b0fef536)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-10-23 15:18:24 -05:00
Rick Elrod
bcd7c860e2 pip tests, use py2 compat sampleproject fork
Change:
- sampleproject has gone py3 only. Use a py2 compatible fork.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-06-26 09:17:28 -07:00
Jesse Pretorius (odyssey4me)
da390b297e [pip] Enable virtualenv_command to have arguments
Currently if virtualenv_command has arguments, then the
search for the binary in the path does not work so the
user has to specify the full path to it.

To allow arguments to be used without having to specify
the path to the binary, we split the module argument into
the command and anything after the first space.

This makes using this module argument more flexible and
user friendly.

Fixes: #52275
2020-04-23 18:13:30 +02:00
Matt Clay
a8a61829b8 Enable passing tests on power. 2020-04-20 10:07:54 -07:00
Yanis Guenane
46d82179d8
Testing: Add support for CentOS Linux On Power platform (#68130)
* Testing: Add CentOS Linux On Power platform

* Add arch designation to remotes.

This avoids overloading the provider with the arch.

Also add a changelog entry.

Co-authored-by: Matt Clay <matt@mystile.com>
2020-04-15 16:22:17 -07:00
Rick Elrod
82c60db49b
pip - Fix check_mode for prerelease packages (#68690)
* pip - Fix check_mode for prerelease packages

Fixes #68592.

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Matt Martz <matt@sivel.net>
2020-04-06 11:18:48 -05:00
Matt Clay
11eee1181a Split out platform specific cleanup in pip test. 2020-02-10 16:55:04 -08:00
Yanis Guenane
4fd2dce7f3
Testing: Add support for AIX platform (#65802) 2020-01-29 15:56:51 -08:00
Matt Clay
479845a05c
Expand Shippable test matrix. (#66912)
* Add 2 CI groups for AWS.
* Add 1 CI group for vmware.
* Add 1 CI group for CS.
* Add 1 CI group for posix.
2020-01-29 14:43:27 -08:00
Matt Clay
51e5b714e0
Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
2020-01-13 13:09:33 -08:00
Martin Krizek
18b9ce8b82
Integration tests: prevent loop squashing (#63847)
1. the feature will be deprecated in 2.11
2. these modules support passing lists
3. loop squashing does not work with collections
2019-10-23 21:02:25 +02:00
Matt Clay
2434abaaf7
Fix git test on FreeBSD with Python 3.x. (#54560) 2019-03-28 15:09:17 -07:00
Matt Clay
6e12517164
Make pip test work with versioned virtualenv. (#54483) 2019-03-27 13:56:28 -07:00
Matt Clay
85689a3eec Enable pip integration test on RHEL 8.0. 2019-01-18 13:50:48 -08:00
Matt Clay
15b1a31aa8 Use different test package in pip test.
This avoids conflicts with other tests such as firewalld,
which use the decorator package installed using OS packages.
2019-01-14 13:02:51 -08:00
Jordan Borean
28a903a1e2
pip tests: skip distribute test case for py3 compat (#49636) 2018-12-07 10:24:46 +10:00
Matt Clay
6f29eafef4 Use virtualenv in pip test to remove distribute. 2018-11-26 16:40:58 -08:00
Zhikang Zhang
93c5781f61 pip: Fix the mistake replacement from 'distribute' to 'setuptools' (#47403)
* Fix the mistake replace from distribute to setuptools

* Add a testcase for this bug
2018-11-26 17:12:36 +01:00
Matt Clay
a41c0405a7
Add CI platform: rhel/8.0 (#48835) 2018-11-16 22:06:19 -08:00
Strahinja Kustudic
b89b688d52 Fix pip idempotence in check mode
PIP package names must be case insensitive, and must consider hyphens
and underscores to be equivalent
(https://www.python.org/dev/peps/pep-0426/#name), because of this the
module didn't work correctly in check mode. For example if the passed
package name had a different case or an underscore instead of a hyphen
(or the other way around) compared to the installed package, check mode
reported as changed, even though packages were installed. Now the module
ignores case and hyphens/underscores in package names, so check mode
works correctly.
2018-11-08 17:09:34 -08:00
Zhikang Zhang
b697da39c8 Fix problem where pip module cannot accept multiple extras
PR #46937
Fixes #46519
2018-10-22 22:21:45 +02:00
Felix Fontein
d2f524fb27 Use {{ ansible_python.executable }} instead of python in integration tests. (#47340) 2018-10-19 09:00:34 +02:00
Zhikang Zhang
501503f4cb
Allow version specifiers for pip install (#41792)
Allow version specifiers for pip install.
2018-08-17 11:46:53 -04:00
Till Maas
bb85bbceeb pip: combine chdir and env only when env is set (#40793)
* pip: combine chdir and env only when env is set

This fixes an AttributeError when chdir without virtualenv is specified:

 File "/tmp/ansible_2UAFsZ/ansible_module_pip.py", line 387, in main
    env = os.path.join(chdir, env)
 File "/usr/lib64/python2.7/posixpath.py", line 75, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'

* Add test for pip with chdir

Signed-off-by: Till Maas <opensource@till.name>
2018-08-13 19:59:01 +02:00
Matt Clay
4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
2018-07-23 20:46:22 -07:00
Pilou
5d7afe9d95 Default squash actions add pip (#41390)
* pip tests: remove trailing spaces

* pip tests: use Jinja tests

* fixup! pip tests: remove trailing spaces

* pip tests: use 'command' instead of 'shell' module

* pip tests: remove unused variable

* pip tests: use a package with fewer dependencies

sampleproject has one dependency: 'peppercorn' and peppercorn doesn't
have any dependency.

* pip tests: check that 'name' param handles list

* pip: squash package parameters

Note that squashing will be removed in 2.11, new code should directly
use a list with the 'name' parameter.
2018-06-11 19:58:13 -04:00
David Moreau Simard
828e33f419 Do not consider an empty version string as a version (#41044)
When using an empty string as the version argument, the module would
before attempt to run something akin to:

    pip install module==""

This changes the behavior to:

    pip install module

Fixes #41043
2018-06-06 09:52:43 +02:00
Robin Roth
1f74609f3c Pip: Reformat tests (#38790)
Use yaml instead of old key=value format
2018-05-14 14:55:01 +02:00
Robin Roth
d6e711b1de Allow empty list of names in pip module (#38789)
pip 10 gives exit code 1 for empty argument lists (pip < 10 gave exit 0)
see also https://github.com/pypa/pip/pull/4210

To still allow playbooks to pass when giving empty lists, don't call
pip in that case, but show a warning.
2018-05-14 14:51:10 +02:00
Robin Roth
90354d282d Install git in pip tests (#39460)
* Install git in pip tests

* Ignore MacOSX
2018-05-02 10:28:10 -04:00
Matt Clay
ea70b49b11 Fix pip integration test. 2018-01-31 23:26:16 -08:00
Lujeni
91ab88dac7 pip: Use chdir directive in the venv path (fixes #25122) (#26865) 2017-10-13 12:39:47 +02:00
Nicklaus McClendon
6dbc3c63f8 Updated pip module to always return changed if venv is created (#24233)
* Updated pip module to always return changed if venv is created

Fixes #23204

* Add integration test to pip (see #23204)
2017-09-12 10:01:29 -07:00
Lujeni
661791dcb7 Fix the editable condition into pip module (#19028) (#19688)
* Fix the editable condition into pip module (#19028)

* Add editable to tests

Default changed to False, so now editable: True is needed explicitly in
tests
2017-07-14 10:54:04 +01:00
Matt Clay
9d8aa43c67 Temporary work-around for setuptools 36.0.0 bug. (#25243)
* Temporary work-around for setuptools 36.0.0 bug.
* Use older setuptools for pip integration test.
* Limit isort version to avoid new test failures.
2017-06-01 16:23:32 +08:00
Matt Clay
6bbd92e422 Initial ansible-test implementation. (#18556) 2016-11-29 21:21:53 -08:00
Adrien Vergé
0e834fc9e4 Fix cosmetic problems in YAML source
This change corrects problems reported by the `yamllint` linter.

Since key duplication problems were removed in 4d48711, this commit
mainly fixes trailing spaces and extra empty lines at beginning/end of
files.
2016-11-11 14:50:57 -08:00
Matt Clay
75e4645ee7 Migrate Linux CI roles to test targets. (#17997) 2016-10-13 09:09:25 -07:00