File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,32 @@ if [ $nonblockingOnly = 0 ]; then
139139 fi
140140fi
141141
142+ # Test SFTP status failure for non-existing file
143+ if [ $nonblockingOnly = 0 ]; then
144+ echo " Test SFTP status failure for non-existing file"
145+ ./examples/echoserver/echoserver -N -1 -R $ready_file &
146+ server_pid=$!
147+ create_port
148+ ./examples/sftpclient/wolfsftp -N -u jill -P upthehill -p $port -G -r $PWD /this_file_does_not_exist_12345.txt -l $PWD /test_output.txt > sftp_status_failure.log 2>&1
149+ RESULT=$?
150+ grep " Unable to copy remote file" sftp_status_failure.log > /dev/null
151+ RESULT_MSG=$?
152+ remove_ready_file
153+ rm -f sftp_status_failure.log
154+ rm -f $PWD /test_output.txt
155+ if [ $RESULT -eq 0 ]; then
156+ echo -e " \n\nERROR: Should have failed for non-existing file"
157+ do_cleanup
158+ exit 1
159+ fi
160+ if [ $RESULT_MSG -ne 0 ]; then
161+ echo -e " \n\nERROR: Unexpected failure path while testing missing remote file"
162+ do_cleanup
163+ exit 1
164+ fi
165+ echo " Successfully received failure status packet"
166+ fi
167+
142168echo -e " \nALL Tests Passed"
143169
144170exit 0
You can’t perform that action at this time.
0 commit comments