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/integration/targets/ansible-galaxy-collection-scm/tasks
Sviatoslav Sydorenko c0e0550bce
🐛 Make integration tests compatible w/ modern Git (#80122)
* 🐛 Make integration tests compatible w/ modern Git

This patch makes use of the `init.defaultBranch` setting to unify
the test across new and old Git versions since one defaults to
`master` and the other uses `main` for the default branch.

Where possible, it uses the `HEAD` committish to avoid having to
normalize the branch name.

The change fixes the following integration tests:

  * `ansible-galaxy`

  * `ansible-galaxy-collection-scm` (recursive collection)

  * `git`

* 🐛Replace `git-symbolic-ref` with a repo template

This custom Git repository template emulates the `init.defaultBranch` setting
on Git versions below 2.28. Ref: https://superuser.com/a/1559582.
Other workarounds mentioned there, like invoking
`git symbolic-ref HEAD refs/heads/main` after each `git init` turned
out to have mysterious side effects that break the tests in surprising ways.

* 🎨 Make Git integration test non-destructive

This patch makes use of the `$HOME` environment variable to trick Git
into using a user-global config generated in the temporary directory.
2 years ago
..
download.yml Use --no-deps when installing amazon.aws and not testing dependencies (#77091) 3 years ago
empty_installed_collections.yml Fix build_ignore when installing a collection from source (#75547) 3 years ago
individual_collection_repo.yml Use --no-deps when installing amazon.aws and not testing dependencies (#77091) 3 years ago
main.yml fix installing collections from git repos that contain MANIFEST.json (#79808) 2 years ago
multi_collection_repo_all.yml Fix build_ignore when installing a collection from source (#75547) 3 years ago
multi_collection_repo_individual.yml Fix build_ignore when installing a collection from source (#75547) 3 years ago
reinstalling.yml Fix build_ignore when installing a collection from source (#75547) 3 years ago
requirements.yml Remove double spaces in errormessage (#77839) 3 years ago
scm_dependency.yml Fix build_ignore when installing a collection from source (#75547) 3 years ago
scm_dependency_deduplication.yml Fix build_ignore when installing a collection from source (#75547) 3 years ago
setup.yml Fix build_ignore when installing a collection from source (#75547) 3 years ago
setup_collection_bad_version.yml ansible-galaxy - validate version for directories and collections in git repos (#76579) 3 years ago
setup_multi_collection_repo.yml Fix build_ignore when installing a collection from source (#75547) 3 years ago
setup_recursive_scm_dependency.yml 🐛 Make integration tests compatible w/ modern Git (#80122) 2 years ago
test_invalid_version.yml ansible-galaxy - validate version for directories and collections in git repos (#76579) 3 years ago
test_manifest_metadata.yml fix installing collections from git repos that contain MANIFEST.json (#79808) 2 years ago
test_supported_resolvelib_versions.yml ansible-galaxy - support resolvelib versions >= 0.5.3, < 0.9.0 (#77649) 3 years ago