Esempio n. 1
0
def test_cleanup_params_defaults():
    inst = Instance(hostname='foobar')
    assert inst.get_cleanup_task_kwargs(exclude_strings=['awx_423_']) == {
        'exclude_strings': ['awx_423_'],
        'file_pattern': '/tmp/awx_*_*',
        'grace_period': 60
    }
Esempio n. 2
0
def test_cleanup_params_for_image_cleanup():
    inst = Instance(hostname='foobar')
    # see CLI conversion in awx.main.tests.unit.utils.test_receptor
    assert inst.get_cleanup_task_kwargs(file_pattern='', remove_images=['quay.invalid/foo/bar'], image_prune=True) == {
        'file_pattern': '',
        'process_isolation_executable': 'podman',
        'remove_images': ['quay.invalid/foo/bar'],
        'image_prune': True,
        'grace_period': 60,
    }