Error Checking sftp results
Hello
I have a script that will download data from a remote server. The script works fine, i just want to run some test cases to ensure that emails are sent when file downloads fail.
What is the easiest way to create this test case? I have try and catch etc in the code already
I ask, as i started downloading a large file , then janked out the network cable to attempt to cause the download to fail.
The program never comes out of the download process(powershell script), it just hangs there and i have to force close the script.
worst comes to worst, i cna search for .filepart showing something happened.
But id rather do this properly, and have a test case prove the code works, and not just blindly trust the try / catch
thanks
I have a script that will download data from a remote server. The script works fine, i just want to run some test cases to ensure that emails are sent when file downloads fail.
What is the easiest way to create this test case? I have try and catch etc in the code already
I ask, as i started downloading a large file , then janked out the network cable to attempt to cause the download to fail.
The program never comes out of the download process(powershell script), it just hangs there and i have to force close the script.
worst comes to worst, i cna search for .filepart showing something happened.
But id rather do this properly, and have a test case prove the code works, and not just blindly trust the try / catch
thanks