Example #1
0
def test_non_existing_seq_data_input_batch(ansible_zos_module):
    hosts = ansible_zos_module
    run_validate_failure.process_batch(hosts, [{
        'src': INVALID_SEQ_SOURCE,
        'dbd_name': 'SEQ1',
        'location': "DATA_SET"
    }], DESTINATION, SYSLIB, 1, 'Data set source does not exist')
def test_empty_uss_file_input_batch(ansible_zos_module):
    hosts = ansible_zos_module
    SOURCE = "/tmp/psbgenEmpty"
    copy = hosts.all.copy(src=EMPTY_SOURCE, dest=SOURCE)
    pprint(copy)
    batch_list = [{'src': SOURCE, 'replace': True, 'location': "USS"}]
    run_validate_failure.process_batch(hosts, batch_list, DESTINATION, SYSLIB,
                                       4, 'Error assembling or linking source')
Example #3
0
def test_empty_seq_data_input_batch(ansible_zos_module):
    hosts = ansible_zos_module
    batch_list = [{
        'src': EMPTY_SEQ_SOURCE,
        'dbd_name': 'SEQ1',
        'location': 'DATA_SET'
    }]
    run_validate_failure.process_batch(hosts, batch_list, DESTINATION, SYSLIB,
                                       4, 'Error assembling or linking source')
Example #4
0
def test_valid_seq_data_set_input_batch(ansible_zos_module):
    hosts = ansible_zos_module
    batch_list = [{
        'src': SOURCE,
        'replace': False,
        'location': "DATA_SET",
        'dbd_name': 'SEQ1'
    }]
    run_validate_failure.process_batch(hosts, batch_list, DESTINATION, SYSLIB,
                                       3, 'Error assembling or linking source')
def test_non_existing_file_input_batch(ansible_zos_module):
    hosts = ansible_zos_module
    batch_list = [{'src': INVALID_SOURCE, 'replace': True, 'location': "USS"}]
    run_validate_failure.process_batch(hosts, batch_list, DESTINATION, SYSLIB,
                                       1, 'Failed to validate input file')
def test_invalid_location_file_input_batch(ansible_zos_module):
    hosts = ansible_zos_module
    batch_list = [{'src': SOURCE, 'replace': True, 'location': 'DATA_SET'}]
    run_validate_failure.process_batch(hosts, batch_list, DESTINATION, SYSLIB,
                                       1, 'invalid data set name')
Example #7
0
def test_invalid_location_seq_data_input_batch(ansible_zos_module):
    hosts = ansible_zos_module
    batch_list = [{'src': SOURCE, 'dbd_name': 'SEQ1', 'location': 'USS'}]
    run_validate_failure.process_batch(hosts, batch_list, DESTINATION, SYSLIB,
                                       1, 'Failed to validate input file')
Example #8
0
def test_missing_dbd_name_seq_data_input_batch(ansible_zos_module):
    hosts = ansible_zos_module
    batch_list = [{'src': SOURCE, 'location': "DATA_SET"}]
    run_validate_failure.process_batch(hosts, batch_list, DESTINATION, SYSLIB,
                                       1, 'dbd_name is not set')