ansible/test/units
Toshio Kuratomi 4cad7e479c
Galaxy publish fix (#63580)
* Handle galaxy v2/v3 API diffs for artifact publish response

For publishing a collection artifact
(POST /v3/collections/artifacts/), the response
format is different between v2 and v3.

For v2 galaxy, the 'task' url returned is
a full url with scheme:

        {"task": "https://galaxy-dev.ansible.com/api/v2/collection-imports/35573/"}

For v3 galaxy, the task url is relative:

        {"task": "/api/automation-hub/v3/imports/collections/838d1308-a8f4-402c-95cb-7823f3806cd8/"}

So check which API we are using and update the task url approriately.

* Use full url for all wait_for_import messages

Update unit tests to parameterize the expected
responses and urls.

* update explanatory comment

* Rename n_url to full_url.

* Fix issue with overwrite of the complete path

* Fixes overwrite of the complete path in case there's extra path stored
  in self.api_sever
* Normalizes the input to the wait_import_task function so it receives
  the same value on both v2 and v3

Builds on #63523

* Update unittests for new call signature

* Add changelog for ansible-galaxy publish API fixes.
2019-10-16 15:23:12 -07:00
..
cli Fix test_galaxy failing test 2019-09-19 13:20:43 -07:00
compat
config
contrib
errors
executor Ensure we don't erase unsafe context in TaskExecutor.run on bytes (#62287) 2019-09-13 13:14:35 -05:00
galaxy Galaxy publish fix (#63580) 2019-10-16 15:23:12 -07:00
inventory_test_data/group_vars
mock
module_utils Properly mask no_log values is sub parameters during failure (#63405) 2019-10-14 09:20:07 -07:00
modules Revert "Remove top-level arguments from network modules (#62603)" 2019-10-15 12:53:51 -07:00
parsing Add a representer for AnsibleUnsafeBytes (#62598) 2019-09-19 14:27:48 -04:00
playbook Wrap CLI Passwords with AnsibleUnsafeText, ensure unsafe context is not lost during encode/decode (#63351) 2019-10-11 09:17:10 -05:00
plugins Account for empty strings when splitting the host pattern (#62442) 2019-09-20 16:03:51 -04:00
regex
template Fix access to exception using Python 3 scoping rules (#62268) 2019-09-17 13:28:37 -04:00
utils add subdir support to collection loading (#60682) 2019-08-21 10:45:04 +01:00
vars
__init__.py
requirements.txt Fix ansible-test collections requirements installation. (#62181) 2019-09-12 02:00:33 -07:00
test_constants.py
test_context.py