Commit Graph

28 Commits (f94ba68d8f287918456c5de8115dafb0c69e8e7c)

Author SHA1 Message Date
Rick Elrod ebc91a9b93
[unarchive] work on older RHEL with group: <gid> (#72098)
Change:
- No longer fail due to old Fedora/RHEL and our failure to try to cast
  gids to integers before trying to pass them to getgrgid() before
  trying to use them.
- Add tests for user/mode for various unarchive formats.

Test Plan:
- New integration tests, ran against centos6 container

Tickets:
- Fixes #71903
4 years ago
Matt Martz 35b0fef536
Changes required for macOS 10.15 (#71841)
* 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
4 years ago
Matt Martz 7c60dadb9a
Updates to Integration tests to pass against Alpine (#70946)
* Start of alpine testing

* More updates

* Add forgotten file

* remove debug

* Add alpine3

* equal

* group 4

* group 4

* group 5

* Try to decrease test length

* libuser only available in testing

* Remove debug

* Make loops target work on hosts without gnu date

* Enable alpine testing

* ci_complete

* Don't specify uid for creating test user

* ci_complete

* Re-sort docker completion

* use newer container image

* ci_complete

* fix indentation

Co-authored-by: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Sam Doran f99f96ceb6
Fix unstable unarchive test (#71004)
* Add mode to copy tasks
* Fix unreliable test by ignoring errors
4 years ago
Philip Douglass ac5f3f8bef
unarchive - Check 'fut_gid' against 'run_gid' in addition to supplemental groups (#65666)
Add integration tests for unarchiving as unprivileged user
Break tasks into separate files for easier reading and maintenance

Create a user by specifying a default group of 'staff' for macOS.

The user module does not actually remove the user directory on macOS,
so explicitly remove it.

Put the removal tasks in an always block to ensure they always run

Co-authored-by: Philip Douglass <philip.douglass@amadeus.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Matt Clay a8a61829b8 Enable passing tests on power. 4 years ago
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>
4 years ago
Rick Elrod 2af76f16be
Unify yaml style in unarchive tests to be dict-style (refs #68272) (#68477)
Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Rick Elrod 0651e1c25f
Add some more test coverage for unarchive (#68272)
* Add some more test coverage for unarchive

This moves over (and slightly extends) coverage which was found in
incidental_flatpak_remote.

Signed-off-by: Rick Elrod <rick@elrod.me>

* add a group for testing too, user creation does not mean group creation on all platforms

Signed-off-by: Rick Elrod <rick@elrod.me>

* update the test group assert

Signed-off-by: Rick Elrod <rick@elrod.me>

* Fix style

Signed-off-by: Rick Elrod <rick@elrod.me>

* block/always

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Matt Clay 6a79bb2b91 Simplify package install in unarchive test.
This will enable the test to work on supported platforms when modules for other platforms are not present.
4 years ago
Yanis Guenane 4fd2dce7f3
Testing: Add support for AIX platform (#65802) 5 years ago
Sam Doran ad341ea4bb Fix unarchive integration test failure due to rpm error (#66420)
* Fix unarchive integration test failure
* Do not cleanup pip packages
5 years ago
Matt Clay f695f40133 Temporarily mark unarchive test unstable. 5 years ago
Sam Doran 22be69188b
Fix unarchive integration test on CentOS 6 (#66362)
* Cleanup packages added for Python TLS support
5 years ago
Matt Clay 86ae3cfa12 Install zip for unarchive test when using dnf. 5 years ago
Sloane Hertel 23f0ca0acd fix unarchive integration tests when LC_ALL is not set to en_US.UTF-8 (#58431) 5 years ago
Matt Clay d2a7cc0b9f Fix integration tests to support remote hosts. 6 years ago
lrrb 4f9f1754b4 fix: ensure than all item of a list of excluded files aren't checked (#45122)
* fix: ensure than list of excluded files aren't checked
* test: exclude a list of files
6 years ago
Evgeni Golov 7c66c90afc introduce `module_utils.urls.fetch_file` as a wrapper to download and save files (#19172)
* module_utils.urls: add fetch_file function

* apt: use fetch_file instead of own download()

* unarchive: use fetch_file instead of own codecopy

* apt: add test for deb=http://…

* unarchive: add test for a remote file download and unarchive

* yum: replace fetch_rpm_from_url by fetch_file

* use NamedTemporaryFile

* don't add a dot to fileext, it's already there
6 years ago
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.
6 years ago
Sijis Aviles ba3db90e3a Fix: wildcard excludes in unarchive with tar archives (#40935)
* fix: exclude using wildcards for tar archives

Fixes #37842, #22947

* fix: Remove quote() as it munges the exclude format

* test: Refactor to use single archive structure

A common structure archived by different methods should simplify some of
the feature tests.

* test: Use common archive layout to validate exclude feature

* test: Use the same exclude checks for zip/tar archives
6 years ago
Sijis Aviles 529ef6446e fix: Ensure zip excluded files are not checked (#40120)
* fix: Ensure zip excluded files are not checked

Fixes #26279

* test: Verify unarchive excludes behaves as expected

* fix: Typos and whitespaces
6 years ago
Matt Clay 84295e6124 Mark destructive tests as such. 7 years ago
Toshio Kuratomi 039383d90f Fix symbolic mode usage in unarchive with zip files
Fixes #21090
7 years ago
chriskarel 991918e9d2 Fix idempotency for Unix permissions in zip files. (#24580)
* Fix idempotency for Unix permissions in zip files.

This fix prevents the unarchive module from reporting 'changed' when a zipfile contains items with Unix permissions that differ from the system default.

* Update zip unarchive tests.

Additional tests for the unarchive module with zip files:
- Test file in zip archive with non-default permissions
- Test file added to zip archive with Windows permissions

* Additional fix for mixed win/unix archives.

  Turns out my original fix fails under some mixed archives, as setting the umask to zero can be applied to those files.  This creates a per-file umask variable, so a mix of permission types don't cause problems.

* CI Checks

CI checks for archives with:
* non default Unix permissions
* Windows permissions


* Workaround for BSD differences.

Using Zipinfo due to lack of support in BSD unzip.
Permissions handling is also different in BSD -- always applies UMASK to file permissions.

* Added checks for creating directories and SSH keys for existing users.
7 years ago
Matt Clay 6bbd92e422 Initial ansible-test implementation. (#18556) 8 years ago
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.
8 years ago
Matt Clay 75e4645ee7 Migrate Linux CI roles to test targets. (#17997) 8 years ago