You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units
Toshio Kuratomi 741b6e65ef [stable-2.9] 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.
(cherry picked from commit 4cad7e4)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
..
cli Fix test_galaxy failing test (#62624) 6 years ago
compat Move unit test compat code out of `lib/ansible/`. (#46996) 7 years ago
config fixes to config manager (#58530) 7 years ago
contrib Fix vmware_inventory unit tests so they run. 7 years ago
errors Add better error when k=v syntax is used with YAML in tasks (#41754) 7 years ago
executor [stable-2.9] Ensure we don't erase unsafe context in TaskExecutor.run on bytes (#62287) 6 years ago
galaxy [stable-2.9] Galaxy publish fix (#63580) 6 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 11 years ago
mock Move unit test compat code out of `lib/ansible/`. (#46996) 7 years ago
module_utils [stable-2.9] Properly mask no_log values is sub parameters during failure (#63405) 6 years ago
modules [stable-2.9] Fix nxos_l3_interfaces module and tests (#62545) 6 years ago
parsing Add a representer for AnsibleUnsafeBytes (#62598) 6 years ago
playbook Wrap CLI passwords as AnsibleUnsafeText (#63352) 6 years ago
plugins gather_facts action plugin: Fix loading network facts modules for smart gathering (#59856) 6 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 7 years ago
template unit tests: remove unused imports (#60462) 6 years ago
utils add subdir support to collection loading (#60682) 6 years ago
vars Fix inventory cache interface (#50446) 7 years ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago
requirements.txt [stable-2.9] Fix ansible-test collections requirements installation. (#62181) 6 years ago
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 9 years ago
test_context.py Unit tests: remove unused imports (#59740) 7 years ago