mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2025-10-24 21:14:00 -07:00 
			
		
		
		
	* 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
		
			
				
	
	
		
			51 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| - hosts: localhost
 | |
|   gather_facts: no
 | |
|   tasks:
 | |
|   - name: Use a specially crafted module to see if things were imported correctly
 | |
|     test:
 | |
|     register: result
 | |
| 
 | |
|   - name: Check that the module imported the correct version of each module_util
 | |
|     assert:
 | |
|       that:
 | |
|         - 'result["abcdefgh"] == "abcdefgh"'
 | |
|         - 'result["bar0"] == "bar0"'
 | |
|         - 'result["bar1"] == "bar1"'
 | |
|         - 'result["bar2"] == "bar2"'
 | |
|         - 'result["baz1"] == "baz1"'
 | |
|         - 'result["baz2"] == "baz2"'
 | |
|         - 'result["foo0"] == "foo0"'
 | |
|         - 'result["foo1"] == "foo1"'
 | |
|         - 'result["foo2"] == "foo2"'
 | |
|         - 'result["qux1"] == "qux1"'
 | |
|         - 'result["qux2"] == ["qux2:quux", "qux2:quuz"]'
 | |
|         - 'result["spam1"] == "spam1"'
 | |
|         - 'result["spam2"] == "spam2"'
 | |
|         - 'result["spam3"] == "spam3"'
 | |
|         - 'result["spam4"] == "spam4"'
 | |
|         - 'result["spam5"] == ["spam5:bacon", "spam5:eggs"]'
 | |
|         - 'result["spam6"] == ["spam6:bacon", "spam6:eggs"]'
 | |
|         - 'result["spam7"] == ["spam7:bacon", "spam7:eggs"]'
 | |
|         - 'result["spam8"] == ["spam8:bacon", "spam8:eggs"]'
 | |
| 
 | |
|   # Test that overriding something in module_utils with something in the local library works
 | |
|   - name: Test that local module_utils overrides facts.py
 | |
|     test_override:
 | |
|     register: result
 | |
| 
 | |
|   - name: Make sure the we used the local facts.py, not the one shipped with ansible
 | |
|     assert:
 | |
|       that:
 | |
|         - result["data"] == "overridden facts.py"
 | |
| 
 | |
|   - name: Test that importing a module that only exists inside of a submodule does not work
 | |
|     test_failure:
 | |
|     ignore_errors: True
 | |
|     register: result
 | |
| 
 | |
|   - debug: var=result
 | |
|   - name: Make sure we failed in AnsiBallZ
 | |
|     assert:
 | |
|       that:
 | |
|         - result is failed
 | |
|         - result['msg'] == "Could not find imported module support code for test_failure.  Looked for either foo.py or zebra.py"
 |