Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add symlinks sanity test. #46467

Merged
merged 6 commits into from
Oct 4, 2018
Merged

Add symlinks sanity test. #46467

merged 6 commits into from
Oct 4, 2018

Conversation

mattclay
Copy link
Member

@mattclay mattclay commented Oct 4, 2018

SUMMARY

Add symlinks sanity test and fix reported issues.

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

sanity and integration tests

ANSIBLE VERSION
ansible 2.8.0.dev0 (sanity-symlinks f3047e6f40) last updated 2018/10/03 23:31:41 (GMT -700)
  config file = None
  configured module search path = [u'/Users/mclay/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/mclay/code/mattclay/ansible/lib/ansible
  executable location = /Users/mclay/code/mattclay/ansible/bin/ansible
  python version = 2.7.14 (default, Mar 22 2018, 11:39:16) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]

@ansibot
Copy link
Contributor

ansibot commented Oct 4, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. docs This issue/PR relates to or includes documentation. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Oct 4, 2018
@mattclay mattclay removed the needs_triage Needs a first human triage before being processed. label Oct 4, 2018
@ansibot
Copy link
Contributor

ansibot commented Oct 4, 2018

The test ansible-test sanity --test shellcheck [explain] failed with 1 error:

test/integration/targets/template_jinja2_latest/runme.sh:21:8: SC2155 Declare and assign separately to avoid masking return values.

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 4, 2018
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 4, 2018
@mattclay mattclay merged commit e2b6047 into ansible:devel Oct 4, 2018
@mattclay mattclay deleted the sanity-symlinks branch October 4, 2018 14:02
mattclay added a commit to mattclay/ansible that referenced this pull request Oct 8, 2018
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.

(cherry picked from commit e2b6047)
mattclay added a commit to mattclay/ansible that referenced this pull request Oct 9, 2018
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.

(cherry picked from commit e2b6047)
abadger pushed a commit that referenced this pull request Oct 10, 2018
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.

(cherry picked from commit e2b6047)
mattclay added a commit that referenced this pull request Oct 10, 2018
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.

(cherry picked from commit e2b6047)
mattclay added a commit to mattclay/ansible that referenced this pull request Oct 12, 2018
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.

(cherry picked from commit e2b6047)
nitzmahone pushed a commit that referenced this pull request Oct 13, 2018
* Fix unit test parametrize order on Python 3.5.

(cherry picked from commit 53b230c)

* Fix ansible-test unit test execution. (#45772)

* Fix ansible-test units requirements install.
* Run unit tests as unprivileged user under Docker.

(cherry picked from commit 379a7f4)

* Run unit tests in parallel. (#45812)

(cherry picked from commit abe8e4c)

* Minor fixes for unit test delegation.

(cherry picked from commit be199cf)

* add support for opening shell on remote Windows host (#43919)

* add support for opening shell on remote Windows host

* added arg completion and fix sanity check

* remove uneeded arg

(cherry picked from commit 6ca4ea0)

* Block network access for unit tests in docker.

(cherry picked from commit 99cac99)

* Make ansible-test available in the bin directory. (#45876)

(cherry picked from commit f3d1f95)

* Support comments in ansible-test flat files.

(cherry picked from commit 5a3000a)

* Fix incorrect use of subprocess.CalledProcessError (#45890)

(cherry picked from commit 24dd87b)

* Improve ansible-test match error handling.

(cherry picked from commit 2056c98)

* Improve error handling for docs-build test.

(cherry picked from commit 2148999)

* Bug fixes and cleanup for ansible-test. (#45991)

* Remove unused imports.
* Clean up ConfigParser usage in ansible-test.
* Fix bare except statements in ansible-test.
* Miscellaneous cleanup from PyCharm inspections.
* Enable pylint no-self-use for ansible-test.
* Remove obsolete pylint ignores for Python 3.7.
* Fix shellcheck issuers under newer shellcheck.
* Use newer path for ansible-test.
* Fix issues in code-smell tests.

(cherry picked from commit ac49247)

* Fix integration test library search path.

This prevents tests from loading modules outside the source tree,
which could result in testing the wrong module if a system-wide
install is present, or custom modules exist.

(cherry picked from commit d603cd4)

* Update default container to version 1.2.0.

(cherry picked from commit d478a4c)
(cherry picked from commit 21c4eb8)

* Fix ansible-test docker python version handling.

This removes the old name based version detection behavior and
uses versions defined in the docker completion file instead, as
the new containers do not follow the old naming scheme.

(cherry picked from commit 54937ba)

* Reduce noise in docs-build test failures.

(cherry picked from commit 4085d01)

* Fix ansible-test encoding issues for exceptions.

(cherry picked from commit 0d7a156)

* Fix ansible-test multi-group smoke test handling. (#46363)

* Fix ansible-test smoke tests across groups.
* Fix ansible-test list arg defaults.
* Fix ansible-test require and exclude delegation.
* Fix detection of Windows specific changes.
* Add minimal Windows testing for Python 3.7.

(cherry picked from commit e53390b)

* Use default-test-container version 1.3.0.

(cherry picked from commit 6d9be66)

* Add file exists check in integration-aliases test.

(cherry picked from commit 33a8be9)

* Improve ansible-test environment checking between tests. (#46459)

* Add unified diff output to environment validation.

This makes it easier to see where the environment changed.

* Compare Python interpreters by version to pip shebangs.

This helps expose cases where pip executables use a different
Python interpreter than is expected.

* Query `pip.__version__` instead of using `pip --version`.

This is a much faster way to query the pip version. It also more
closely matches how we invoke pip within ansible-test.

* Remove redundant environment scan between tests.

This reuses the environment scan from the end of the previous test
as the basis for comparison during the next test.

(cherry picked from commit 0dc7f38)

* Add symlinks sanity test. (#46467)

* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.

(cherry picked from commit e2b6047)

* Fix parametrize warning in unit tests.

(cherry picked from commit 1a28898)

* Update MANIFEST.in (#46502)

* Update MANIFEST.in:

- Remove unnecessary prune.
- Include files needed by tests.
- Exclude botmeta sanity test.

These changes permit sanity tests to pass on sdist output.
(cherry picked from commit cbb49f6)

* Fix unit tests which modify the source tree. (#45763)

* Fix CNOS unit test log usage.
* Use temp dir for Galaxy unit tests.
* Write to temp files in interfaces_file unit test.
* Fix log placement in netapp_e_ldap unit test.

(cherry picked from commit 0686450)

* Fix ansible-test custom docker image traceback.

(cherry picked from commit 712ad9e)

* ansible-test: Create public key creating Windows targets (#43760)

* ansible-test: Create public key creating Windows targets

* Changed to always set SSH Key for Windows hosts

(cherry picked from commit adc0efe)

* Fix and re-enable sts_assume_role integration tests (#46026)

* Fix the STS assume role error message assertion when the role to assume does not exist.

(cherry picked from commit 18dc928)

* Fix ACI unit test on Python 3.7.0.

The previous logic was only needed for pre-release versions of 3.7.

(cherry picked from commit c0bf981)

* Remove placeboify from unit tests that are not calling AWS (i.e. creating a recording) (#45754)

(cherry picked from commit 2167ce6)

* Update sanity test ignore entries.
@mattclay
Copy link
Member Author

The restriction on directory symlinks is due to differences in behavior between Linux and BSD-derived platforms when creating hard links to symlinks. This results in Python sdist creation making copies of symlinked directories on BSD-derived platforms instead of preserving the symlinks as is done on Linux.

Linux:

$ touch demo-file && ln -s demo-file demo-symlink && ln demo-symlink demo-hardlink && ls -l demo*
-rw-r--r-- 1 demo demo 0 Jan 28 11:54 demo-file
lrwxrwxrwx 2 demo demo 9 Jan 28 11:54 demo-hardlink -> demo-file
lrwxrwxrwx 2 demo demo 9 Jan 28 11:54 demo-symlink -> demo-file

FreeBSD:

$ touch demo-file && ln -s demo-file demo-symlink && ln demo-symlink demo-hardlink && ls -l demo*
-rw-r--r--  2 demo  demo  0 Jan 28 11:54 demo-file
-rw-r--r--  2 demo  demo  0 Jan 28 11:54 demo-hardlink
lrwxr-xr-x  1 demo  demo  9 Jan 28 11:54 demo-symlink -> demo-file

macOS:

$ touch demo-file && ln -s demo-file demo-symlink && ln demo-symlink demo-hardlink && ls -l demo*
-rw-r--r--  2 demo  demo  0 Jan 28 11:54 demo-file
-rw-r--r--  2 demo  demo  0 Jan 28 11:54 demo-hardlink
lrwxr-xr-x  1 demo  demo  9 Jan 28 11:54 demo-symlink -> demo-file

@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. docs This issue/PR relates to or includes documentation. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants