mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
Starting to add additional unit tests for VariableManager
Required some rewiring in inventory code to make sure we're using the DataLoader class for some data file operations, which makes mocking them much easier. Also identified two corner cases not currently handled by the code, related to inventory variable sources and which one "wins". Also noticed we weren't properly merging variables from multiple group/host_var file locations (inventory directory vs. playbook directory locations) so fixed as well.
This commit is contained in:
parent
87f75a50ad
commit
ff9f5d7dc8
13 changed files with 233 additions and 54 deletions
|
@ -22,11 +22,7 @@ import stat
|
|||
from time import sleep
|
||||
from errno import EEXIST
|
||||
|
||||
__all__ = ['is_executable', 'unfrackpath']
|
||||
|
||||
def is_executable(path):
|
||||
'''is the given path executable?'''
|
||||
return (stat.S_IXUSR & os.stat(path)[stat.ST_MODE] or stat.S_IXGRP & os.stat(path)[stat.ST_MODE] or stat.S_IXOTH & os.stat(path)[stat.ST_MODE])
|
||||
__all__ = ['unfrackpath']
|
||||
|
||||
def unfrackpath(path):
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue