add test to ensure integers are converted to string

before setting them up to be environment variable values

Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
This commit is contained in:
Soumik Dutta 2023-03-18 02:57:56 +05:30
parent 0db137efdf
commit fb9677230b
2 changed files with 6 additions and 1 deletions

View file

@ -318,7 +318,7 @@ properties:
borg_files_cache_ttl:
type: integer
description: |
Maximum time to live (ttl) for entries in the borg files
Maximum time to live (ttl) for entries in the Borg files
cache.
example: 20
borg_security_directory:

View file

@ -32,3 +32,8 @@ def test_make_environment_with_relocated_repo_access_should_override_default():
environment = module.make_environment({'relocated_repo_access_is_ok': True})
assert environment.get('BORG_RELOCATED_REPO_ACCESS_IS_OK') == 'yes'
def test_make_environment_with_integer_variable_value():
environment = module.make_environment({'borg_files_cache_ttl': 40})
assert environment.get('BORG_FILES_CACHE_TTL') == '40'