Commit Graph

11649 Commits (f2abfc4b3d03a2baa078477d0ad2241263a00668)

Author SHA1 Message Date
Matt Clay f2abfc4b3d
ansible-test - Parse content config only once. (#78418) 2 years ago
Jordan Borean ad79c1e0d0
Add support for json in adhoc -a (#78114)
Co-authored-by: Sandra McCann <samccann@redhat.com>
2 years ago
Matt Clay d8fefba20e
ansible-test - Update locale logic to match core. (#78389)
Now that core requires UTF-8 filesystem encoding, ansible-test does as well.

Additionally, the `en_US.UTF-8` or `C.UTF-8` encoding must be available.
Previously the `en_US.UTF-8` encoding was requested, but its availability was never verified.
The fallback to `C.UTF-8` maintains UTF-8 encoding while allowing more flexibility in the running environment.
2 years ago
Sloane Hertel 05608b20e8
Fix listing collections that are missing the metadata required by build (#76596)
* Rethread pr/70185 through the dependency resolver

Hang optional metadata toggle on the ConcreteArtifactsManager instead of threading it through whole list codepath

Don't error while listing collections if a collection's metadata is missing keys required for building a collection.

Give an informative warning if metadata has been badly formatted.

Co-authored-by: Sam Doran <sdoran@redhat.com>
2 years ago
Brian Coca 9b79d6ba35
config error origin (#78407) 2 years ago
Sloane Hertel a2174fc6d9
Fix removing existing dir/files with `ansible-galaxy collection init --force` (#78403)
* Remove collection contents when re-initializing with --force


Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2 years ago
Martin Krizek ce6c9befb8
Do not allow handlers from dynamic includes to be notified (#78399)
* Do not allow handlers from dynamic includes to be notified
2 years ago
Matt Martz f6d2b18322
Correctly get the filename from a url in fetch_file. Fixes #29680 (#78383) 2 years ago
Matt Clay b0b58fa7c2
ansible-test - Update base and default containers. (#78377) 2 years ago
Matt Clay 234938cd76
Change the language used in the unarchive test. (#78382)
The current language pack fails to install on Ubuntu 22.04.
However, since the langauge only needs to be non-English, changing it preserves the test functionality.
2 years ago
Matt Clay cc5c706681
Update unit test controller requirements. (#78376) 2 years ago
Matt Clay f5c01a8b6e
Remove unit test Python 2.6 compat. (#78369) 2 years ago
Matt Clay b86a18bd27
Remove unit test pytz requirement. (#78368) 2 years ago
Matt Davis 1368bfa348
PluginLoader now installs module-to-be-imported in sys.modules before exec (as Python import does). (#78364) 2 years ago
Ruediger Pluem 0ef1376966
Make distro.id() report newer versions of OpenSuSE (at least >=15) also report as opensuse (#76121)
* Report OpenSuSE >= 15 as opensuse

Make distro.id() report newer versions of OpenSuSE (at least >=15) also report
as opensuse. They report themselves as opensuse-leap.

* Add a test
2 years ago
Matt Clay a3c90dd0bc
ansible-test - Fix TTY and output handling. (#78350) 2 years ago
Sloane Hertel 5728d72cda
Fix KeyError for ansible-galaxy when caching paginated responses from v3 (#78325)
* Fix KeyError for ansible-galaxy when caching paginated responses from v3

* changelog

* generate responses in loop for test

Co-authored-by: Matt Martz <matt@sivel.net>
2 years ago
Matt Martz 1429672213
Add pep440 version_type for version test (#78308) 2 years ago
Matt Martz 9d4ced1237
wait_for - Read file and perform comparisons using bytes to avoid decode errors (#78317)
* wait_for - Read file and perform comparisons using bytes to avoid decode errors. Fixes #78214

* Write non-ascii via script instead of static file

* Use contexlib.closing to support py27 context manager

* Use executable from task, instead of shebang

* Update encoded bytes to utf16
2 years ago
Matt Clay 0012263c7a
ansible-test - Fix handling of args after `--` (#78328) 2 years ago
Matt Clay 61af59c808
ansible-test - Update distro containers to 4.4.0. (#78322) 2 years ago
Matt Clay 4cd3425dfe
ansible-test - Update coverage to 6.4.2 (#78320) 2 years ago
Martin Krizek b56b38b3ba
Use classproperty to access field attributes of a class (#78180)
* Use classproperty to access field attributes of a class, consolidate into one class
2 years ago
Matt Clay 90ef914f77
ansible-test - Drop Python 3.8 controller support. (#78237) 2 years ago
Matt Clay 681c32ec65
Fix fetch integration test on macOS. (#78314)
The test can now run split.
2 years ago
Matt Clay 61ea6c4a5b
Fix expect integration test. (#78315)
The test can now run split on macOS.
2 years ago
Matt Clay 27d39be580
Fix become integration test. (#78313)
* Don't set become_flags in become integration test.

Setting the flags in the test overrides the default value in the become plugins, which was not intentional.

* Remove hack for broken implicit tilde support.

It was only broken because the tests were overriding the default become flags for sudo.

* Simplify assertions.
2 years ago
Sviatoslav Sydorenko 619a1fa7e2
Drop custom repo from libuser install @ Alpine CI (#78305)
`group` and `setup_cron` integration tests currently install `libuser` and `faketime`
packages respectively, from the non-default edge/testing repositories. It is no
longer necessary to do so for the former so this patch drops the repo option. As
for the latter, this patch includes a note explaining when the same could be done
for it too.

This patch also adds a note on installing `faketime` on Alpine in CI.

Co-Authored-By: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay de2163b160
Overhaul become integration tests. (#78312) 2 years ago
Matt Clay f3f4ad9332
ansible-test - Use sudo for all remotes. (#78310) 2 years ago
Matt Clay 8565deaae3
ansible-test - Install `acl` on Alpine remotes. (#78303) 2 years ago
Matt Clay 8bb20fe06b
ansible-test - Enable ACL support on more remotes. (#78299) 2 years ago
Matt Clay 9b42f9befe
Revert "Re-enable strategy units (#78293)" (#78300)
This reverts commit c6c9d90ca4.
2 years ago
Matt Martz c6c9d90ca4
Re-enable strategy units (#78293) 2 years ago
Matt Clay ee4588abca
Split integration test fixes. (#78281)
* Add setup_test_user integration target.

This integration target creates a temporary test user and removes
it when the current integration target finishes. This user is
configured with a password so it can be used with become, even
when the current user is unprivileged.

* Fix slurp integration test.

* Fix unarchive integration test.

* Fix module_utils integration test.
2 years ago
Matt Clay b63812bc08 ansible-test - Enable ACLs on FreeBSD remotes.
This allows integration tests to switch from one unprivileged user
to another, sharing files between the users using ACLs.
2 years ago
Martin Krizek d070b03ad8
Fix templating nested vars with convert_data=False (#78273)
Regression introduced in #78259.
2 years ago
Martin Krizek 9afdb7fec1
template module/lookup: fix convert_data for macros (#78259)
Fixes #78141
2 years ago
James Livulpi d635b871d1
Cleanup write_file method in uri (#76412) 2 years ago
Matt Martz d58e69c82d
Add support for gzip decoding responses (#41925) 2 years ago
zorun a6e671db25
Fix AIX processor facts and add unit test (#78223)
- `processor_count` was erroneously set to the number of cores
- `processor_cores` was erroneously set to the number of threads per core
- `processor_vcpus` and `processor_threads_per_core` were not set
- `processor` was a string, while it's supposed to be a list

Before:

```
"ansible_processor": "PowerPC_POWER7",
"ansible_processor_cores": 4,
"ansible_processor_count": 12,
```

After:

```
"ansible_processor": [
    "PowerPC_POWER7"
],
"ansible_processor_cores": 12,
"ansible_processor_count": 1,
"ansible_processor_threads_per_core": 4,
"ansible_processor_vcpus": 48,
```

Also add a unit test.

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
2 years ago
Matt Clay b85bcd7abf
Fix module_utils_common.respawn test. (#78248)
The respawn failure can be returned on either stdout or stderr.
2 years ago
Kay Yan 2e4b0fefbf
Added Kylin Linux Advanced Server Support (#78232) 2 years ago
Jordan Borean 75de4a37bc
validate-modules - allow raw module return type (#78231) 2 years ago
Martin Krizek 2bc2153c01
yum: fix releasever for latest (#78066)
Fixes #78058
2 years ago
Matt Martz b1dd2af4ca
Preflight utf8 encodings check (#78175) 2 years ago
Brian Coca d26801e994
Fix wording for :ref|term: substitution (#78216)
* Fix workding for :ref|term: subsitution

 now matches 'seealso' and makes more sense:

  ```
  delay:
  applies_to:
  - Task
  description: Number of seconds to delay between retries. This setting is only used
    in combination with `until`.
  ```
 vs
  ```
  delay:
  applies_to:
  - Task
  description: Number of seconds to delay between retries. This setting is only used
    in combination with website for `until`.
  ```

* updated unit tests

* match see also

* more sanity
2 years ago
Martin Krizek 17d52c8d64
Move undefined check from concat to finalize (#78165)
* Move undefined check from concat to finalize

In the classic Jinja2's Environment str() is called on the return value of the
finalize method to potentially trigger the undefined error. That is not
the case in NativeEnvironment where string conversion of the return value is
not desired. We workaround that by checking for Undefined in all of our concat
functions. It seems simpler to do it earlier in the finalize method(s) instead.
As a side-effect it fixes an undefined variable detection in imported templates.

Fixes #78156

ci_complete

* Fix sanity

* ...

* sigh
2 years ago
Sloane Hertel 1562672bd1
Make unit test for missing git executable more generic (#78173)
* Make unit test for missing git executable more generic

* use MagicMock side_effect to raise exception instead
2 years ago
LRitzdorf 6bcb494f83
[dnf] Fix skip_broken, add test coverage (v2) (#78158)
* [dnf] Fix skip_broken, add test coverage

Change:
- skip_broken was set in config but not actually used in calls to
  base.install()
- added a lot of test cases with specialized repo
- got rid of external (docker repo) nobest test cases since the
  specialized repo works well for those too
- Slight cleanup and adding comments in dnf module

Test Plan:
- ci_complete

Tickets:
- Fixes #73072

Original-author: Rick Elrod <rick@elrod.me>

* Use a better test for checking results list

ci_complete

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

Co-authored-by: Rick Elrod <rick@elrod.me>
2 years ago