-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'report_diff' key in result data in case of available diff data
In case that a 'diff' key with 'before' and 'after' data is available create a unified diff from 'before' and 'after' and store it below the 'report_diff' key as a string for later consumption in config reports on the Foreman server. Remove the 'diff' key afterwards to save space as in case of a file the content is probably big and it is stored twice (before and after). * plugins/callback/foreman.py: Implement feature. * tests/callback/three_hosts.yml: Add tasks to generate diffs when running in diff mode. * tests/conftest.py: Allow to run the playbook in diff mode. * tests/test_callback.py: - Run the playbook for the foreman report type in diff mode - Ignore further items when comparing the json data that depend on the local environment - Remove additional strings that are different in each run - Transform the json string into json data to improve data handling * tests/fixtures/callback/dir_store/*: Adjust fixtures to new tests and changes in format. Signed-off-by: Ruediger Pluem <[email protected]>
- Loading branch information
Showing
10 changed files
with
741 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.