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
Marius Gedminas 0a7f2c202b Improve --diff output when files lack trailing newlines
The behavior now matches GNU diff.

Fixes #14094.

Example of output before this change:

    TASK [healthchecks.io : hourly healthchecks.io ping] ***************************
    changed: [ranka]
    --- before: /etc/cron.hourly/mg-healthchecks-dot-io
    +++ after: /tmp/tmpOTvXTw
    @@ -1,2 +1,2 @@
     #!/bin/sh
    -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null+curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null

after this change:

    TASK [healthchecks.io : hourly healthchecks.io ping] ***************************
    changed: [ranka]
    --- before: /etc/cron.hourly/mg-healthchecks-dot-io
    +++ after: /tmp/tmpOTvXTw
    @@ -1,2 +1,2 @@
     #!/bin/sh
    -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null
    \ No newline at end of file
    +curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null

The added unit tests contain more examples.

This commit also takes care to avoid "no newline at EOF" warnings when
no_log is in effect, and also when modules return dicts rather than
strings.  (It also removes trailing whitespace from using json
serialization when diffing dicts, because I hate trailing whitespace in
Python source files, even if they're test files.)
9 years ago
..
cli testing GalaxyCLI.run() does what is expected 9 years ago
contrib skip vmware inventory when missing lib 9 years ago
errors Add empty-init code-smell script. (#18406) 9 years ago
executor Add empty-init code-smell script. (#18406) 9 years ago
inventory Add lots of test cases to inventory/test_host.py (#17827) 9 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 11 years ago
mock Add empty-init code-smell script. (#18406) 9 years ago
module_utils Adding auth support for google-api-python-client and gcloud-python (#19090) 9 years ago
modules refactors ios_config to use network_cli plugin (#20042) 9 years ago
parsing Add a encode() to AnsibleVaultEncryptedUnicode (#19840) 9 years ago
playbook unit tests for playbook/conditional.py (#18586) 9 years ago
plugins Improve --diff output when files lack trailing newlines 9 years ago
template Add empty-init code-smell script. (#18406) 9 years ago
utils FEATURE: adding variable serial batches 10 years ago
vars ansible_playbook_python (#18530) 9 years ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago