def test_missing_dbd_name_seq_data_input_single_src(ansible_zos_module): hosts = ansible_zos_module run_validate_failure.process_single_src(hosts, DESTINATION, SYSLIB, 1, 'dbd_name is not set', src=SOURCE, location='DATA_SET')
def test_non_existing_file_input_single_src(ansible_zos_module): hosts = ansible_zos_module run_validate_failure.process_single_src(hosts, DESTINATION, SYSLIB, 1, 'Failed to validate input file', src=INVALID_SOURCE, replace=True, location='USS')
def test_invalid_location_file_input_single_src(ansible_zos_module): hosts = ansible_zos_module run_validate_failure.process_single_src(hosts, DESTINATION, SYSLIB, 1, 'invalid data set name', src=SOURCE, replace=True, location='DATA_SET')
def test_non_existing_seq_data_input_single_src(ansible_zos_module): hosts = ansible_zos_module run_validate_failure.process_single_src(hosts, DESTINATION, SYSLIB, 1, 'Data set source does not exist', src=INVALID_SEQ_SOURCE, dbd_name='SEQ1', location='DATA_SET')
def test_invalid_location_seq_data_input_single_src(ansible_zos_module): hosts = ansible_zos_module run_validate_failure.process_single_src(hosts, DESTINATION, SYSLIB, 1, 'Failed to validate input file', src=SOURCE, dbd_name='SEQ1', location='USS')
def test_missing_dbd_name_seq_data_input_single_src(ansible_zos_module): # Here we do not pass dbd_name for seq data set as input and expect failure hosts = ansible_zos_module run_validate_failure.process_single_src(hosts, DESTINATION, SYSLIB, 1, 'dbd_name is not set', src=SOURCE, location='DATA_SET')
def test_invalid_location_seq_data_input_single_src(ansible_zos_module): # Here we pass invalid location name for SEQ data set as input source and expect failure hosts = ansible_zos_module run_validate_failure.process_single_src(hosts, DESTINATION, SYSLIB, 1, 'Failed to validate input file', src=SOURCE, dbd_name='SEQ1', location='USS')
def test_valid_seq_data_set_input_single_src(ansible_zos_module): hosts = ansible_zos_module run_validate_failure.process_single_src( hosts, DESTINATION, SYSLIB, 3, 'Error assembling or linking source', src=SOURCE, replace=False, location='DATA_SET', dbd_name='SEQ1')
def test_empty_seq_data_input_single_src(ansible_zos_module): hosts = ansible_zos_module run_validate_failure.process_single_src( hosts, DESTINATION, SYSLIB, 4, 'Error assembling or linking source', src=EMPTY_SEQ_SOURCE, replace=True, dbd_name='SEQ1', location='DATA_SET')
def test_valid_seq_data_set_input_single_src(ansible_zos_module): # Here we pass seq data set as input with already existing destination with replace set to false and to expect fail hosts = ansible_zos_module run_validate_failure.process_single_src( hosts, DESTINATION, SYSLIB, 3, 'Error assembling or linking source', src=SOURCE, replace=False, location='DATA_SET', dbd_name='SEQ1')
def test_empty_uss_file_input_single_src(ansible_zos_module): hosts = ansible_zos_module SOURCE = "/tmp/psbgenEmpty" copy = hosts.all.copy(src=EMPTY_SOURCE, dest=SOURCE) pprint(copy) run_validate_failure.process_single_src( hosts, DESTINATION, SYSLIB, 4, 'Error assembling or linking source', src=SOURCE, replace=True, location='USS')