summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/git (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Typo fixes and other bits and bobs (#83672)Lee Garrett2024-07-271-1/+1
| | | Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
* test: remove ansible-examples.git repo (#81600)Abhijeet Kasurde2024-04-172-16/+19
| | | | | | | | | | | | | * test: remove ansible-examples.git repo * To speed up git tests remove reference to ansible-examples.git Fixes: #81327 * Make CI green Signed-off-by: Ansible Test Runner <noreply@example.com> Co-authored-by: Ansible Test Runner <noreply@example.com> Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* 🐛 Make integration tests compatible w/ modern Git (#80122)Sviatoslav Sydorenko2023-03-0313-45/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 🐛 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.
* Re-organize CI test groups for POSIX tests. (#77420)Matt Clay2022-08-041-1/+1
| | | | | | * `context/target` tests must be in groups 1 - 2. * `context/controller` tests must be in groups 3 - 5. This makes it easier to efficiently organize groups and balance test runtimes.
* Remove COMMAND_WARNINGS and warn (#77411)Martin Krizek2022-03-301-1/+0
| | | | | | * Remove COMMAND_WARNINGS and warn Fixes #77394
* ansible-test - Correct a typo in comments (#77148)saeedhosseini2022-03-011-1/+1
|
* ansible-test - Remove AIX provisioning support. (#76747)Matt Clay2022-01-121-1/+0
| | | | | * ansible-test - Remove AIX provisioning support. * Remove `skip/aix` integration test aliases. * Remove build for AIX binary module.
* Don't use output_dir in target tests (#76107)Matt Martz2021-10-215-16/+17
| | | | | | | | | * Don't use output_dir in user tests * Move blockinfile tests from using output_dir to depending on setup_remote_tmp_dir * Don't use output_dir in git tests * Don't use output_dir in uri tests
* Require Jinja2 3.0.0 (#75881)Martin Krizek2021-10-201-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Require Jinja2 3.0.0 ci_complete * Fix sanity * Remove Jinja min/max tests * ansible-test changes * ci_complete * More cleanup ci_complete * Revert _count_newlines_from_end :( and other stuff * Fix sanity * It's using host_vars ... * Unused import * Remove overridden groupby filter * environmentfilter -> pass_environment * Explain preserve_trailing_newlines * Add changelog * ci_complete * Deprecated ANSIBLE_JINJA2_NATIVE_WARNING * native_helpers.py cleanup * More cleanup in the find intgration test
* Fix git submodules path issue (#75655)maulikd2021-09-161-0/+26
| | | | | * Fix git path used for submodules * Fix git submodules integration test
* Integration test fixes.Matt Clay2021-05-011-0/+1
|
* [2.12] Add accept_newhostkey option to git module (#73819)Amin Vakil2021-04-163-0/+92
| | | | | * Add integration test for accept_newhostkey option * Add changelog
* Changes required for macOS 10.15 (#71841)Matt Martz2020-09-251-0/+1
| | | | | | | | | | | | | | * 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
* Updates to Integration tests to pass against Alpine (#70946)Matt Martz2020-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* git: verify, only use --raw when we need it (#70900)Rick Elrod2020-07-292-2/+22
| | | | | | | | | | | | | | | Change: - Allow older git to verify tags again - Enable verification tests everywhere, even if most of them only work on newer git. Some of them work on older git and they test the --raw parameter. Test Plan: - Re-enabled subset of git tests Tickets: - Fixes #64469 Signed-off-by: Rick Elrod <rick@elrod.me>
* git - add single_branch option (#28465)Laurent Coustet2020-06-293-16/+105
| | | | | | | | | | | | | | | | | In some usecases, we want to be able to clone a single branch of a repository, without using --depth (which implies --single-branch). * Use branch name when available - update description of parameter - consolidate branch or tag checking for easy reuse * Add changelog * Use static task imports rather than dynamic includes * Add integration tests for single_branch * Account for older versions of git * Minor tweak to warnings Co-authored-by: Laurent Coustet <laurent.coustet@clarisys.fr> Co-authored-by: Sam Doran <sdoran@redhat.com>
* [git] make force=True apply to git fetches (#68691)Rick Elrod2020-04-064-9/+57
| | | | | Fixes #67972 Signed-off-by: Rick Elrod <rick@elrod.me>
* Split up platform cleanup in tests. (#67320)Matt Clay2020-02-114-15/+19
| | | | | | * Split up platform cleanup for git test. * Split up platform cleanup for ansible-galaxy test.
* Testing: Add support for AIX platform (#65802)Yanis Guenane2020-01-301-0/+1
|
* git - add an 'archive_prefix' option (#66067)dexpl2020-01-244-1/+81
| | | Add integration tests for new option
* Change integration tests in order to pass on Fedora 30 (#58081)Sam Doran2019-06-193-35/+45
| | | | | | | | | | | | | | | | * Use different package for DNF tests Ninja caused errors in Fedora 30. This works in both Fedora 29 and 30. * Fix git integration tests Git >= 2.21.0 has either a bug or change in behavior where it errors when fetching a repository containing submodules that are behind the upstream submodule commits. It's weird and I don't fully understand it. Get around this my checking out specific commits from a repository rather than switch the origin URL. * Fix PostgreSQL tests The error message is slightly different
* Fix git test on FreeBSD with Python 3.x.Matt Clay2019-03-292-0/+14
|
* Add shippable/posix/group4/ for CI. (#53816)Matt Clay2019-03-151-1/+1
|
* git: kill gpg-agent in tests on newer OpenSUSE hosts (#52476)Jordan Borean2019-02-181-1/+1
|
* More test fixes for split controller/remote tests.Matt Clay2019-01-262-3/+3
|
* Fix integration tests to support remote hosts.Matt Clay2019-01-252-3/+18
|
* ansible-test: add Ubuntu 18.04 container (#50790)Jordan Borean2019-01-221-0/+2
| | | | | | | | * ansible-test: Add Ubuntu 18.04 to Shippable CI nodes * re-add ubuntu1604/3 to matrix * forgot to add environment for git kill gpg-agent
* ansible-test git: kill gpg-agent to remove locks (#50917)Jordan Borean2019-01-151-0/+4
| | | | | | * ansible-test git: kill gpg-agent to remove locks * skip gpg-agent kill for OpenSUSE
* Rebalance shippable/posix/ CI groups.Matt Clay2018-10-021-1/+1
|
* Support `--separate-git-dir` option in Git module (#41712)Zhikang Zhang2018-08-173-9/+76
| | | Make git module support --separate-git-dir option. When git version is higher than 1.7.5, use built-in --separate-git-dir option during the clone. When lower, adjust the location of git dir manually after clone to achieve the same effect.
* Update Shippable integration test groups. (#43118)Matt Clay2018-07-241-1/+1
| | | | | | | * Update Shippable integration test groups. * Update integration test group aliases. * Rebalance AWS and Azure tests with extra group. * Rebalance Windows tests with another group.
* Detect separate git dir and set git config path value appropriatelySenya2018-05-232-0/+67
| | | | | PR #38016 Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* add newer syntax to detached HEAD check (#38879)Alan Rominger2018-04-231-0/+11
|
* Move requirements into tests. (#35885)Matt Clay2018-02-101-0/+5
|
* [git] Fix switching branch of shallow clone (#18728)Maarten Bezemer2018-02-082-0/+61
| | | | | | | | | | | | | | | * [git] Fix fetching branch of shallow clone * Use absolute file:// paths to make sure git uses shallow clones * Improve tests * Fix sanity errors * Match style according to other (depth) tests * Improve tests Now they will fail without the fix of this PR
* Revert "Move requirements into tests. (#35197)"Matt Clay2018-01-231-5/+0
| | | | This reverts commit 4f6017dc1629361cce6fa3e2e035a4710550db9e.
* Move requirements into tests. (#35197)Matt Clay2018-01-231-0/+5
|
* Deprecate tests used as filters (#32361)Matt Martz2017-11-2710-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Warn on tests used as filters * Update docs, add aliases for tests that fit more gramatically with test syntax * Fix rst formatting * Add successful filter, alias of success * Remove renamed_deprecation, it was overkill * Make directory alias for is_dir * Update tests to use proper jinja test syntax * Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax * Add conversion script, porting guide updates, and changelog updates * Update newly added uses of tests as filters * No underscore variable * Convert recent tests as filter changes to win_stat * Fix some changes related to rebasing a few integration tests * Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name * Add test for tests_as_filters_warning * Update tests as filters in newly added/modified tests * Address recent changes to several integration tests * Address recent changes in cs_vpc
* Integration test for git archive without update (#32390)Abhijeet Kasurde2017-11-091-0/+42
| | | | | | | | * Unit test for git archive without update Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Clean clone the repo first
* Correct usage for shutil.rmtree (#31541)Abhijeet Kasurde2017-10-1317-312/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correct usage for shutil.rmtree Fix adds correct usage of shutil.rmtree in git module Fixes: #31225 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Include archive tests so they get run * Use new include syntax * Cleanup syntax on git tests - use multi-line YAML - remove unneeded {{ }} around vars in conditionals - remove unneeded quotes - add task file name to task names for easier troubleshooting when things fail * Make archive tests work for RHEL/CentOS 6 The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped. The older version of git required gzip compression to be skipped on RHEL/CentOS 6. * Account for ansible_distribution_major_version missing
* Only use `git verify-tag` when verifying annotated tags (#26414)Andreas Olsson2017-07-194-59/+242
| | | | | | | | | | | | | | | * Only use `git verify-tag` when verifying annotated tags The command `git verify-tag` only applies to annotated tags. When verifying lightweight tags, which are more similar to non-moving branches, one has to use `git verify-commit` instead. Using ':' as a separator is appropriate since that is one of the characters not allowed in a Git reference name. See also https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html * Improve testing of the Git module's gpg verification
* Git test is no longer destructiveRobin Roth2017-07-151-1/+0
| | | | Fixed by #26458
* better backwards compat handling of statusBrian Coca2017-07-061-2/+2
| | | | | | | | restored 'rc' inspection but only when failed is not specified removed redundant changed from basic.py as task_executor already adds removed redundant filters, they are tests added aliases to tests removed from filters fixed test to new rc handling
* Update git test to not rm ~/.ssh/known_hosts.Matt Clay2017-07-062-9/+8
|
* In the git module let ssh do its own host checkingAndreas Olsson2017-06-261-1/+0
| | | | | | | | | | | | | There are too many possible special cases for Ansible to be able to precheck known_hosts files without introducing all kinds of false failures. * Alternative known_hosts paths * Alternative host name aliases * ssh host certificates * SSHFP + DNSSEC Fixes #24860
* Reenable git tests (#25341)Robin Roth2017-06-052-8/+8
| | | | | * Revert "Temporarily disable failing git test." * Use correct hash for depth=1 test
* Temporarily disable failing git test.Matt Clay2017-06-041-1/+1
|
* git: git reset with branchChulki Lee2017-04-042-0/+32
| | | | | `git reset <ref>` can be ambiguous and fail to switch to the correct branch. To avoid it, specify branch as well.
* Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset… ↵Miyurz2017-03-282-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | (#22502) * Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset fails when file with the name 'origin' is present in the repository * #22455 Integration test for git module to test if it clones a repository with a file named origin * Fixed yaml errors for test/integration/roles/test_git_clone/tasks/main.yml * Removed the newly added target git and moved the code to test/integration/targets/git * Reorganised code structure as per comments * Fixed playbook name * Added code that didn't make it to the playbook before. * No longer need git.yml * Remove non tasks specific code from tasks file and use existing variables * Removed msg var from the vars.yml
* Fix git clone tag with depth=1Robin Roth2017-03-021-0/+22
| | | | | | | | | * Fixes #21316, add testcase based on this * Add option `--branch NAME` to git clone command in case of branch or tag in combination with depth=1 * This option should work back to at least git 1.8 and thus on all supported distributions * Provide better warning if depth is dropped