I've been reading a lot of entries about Mr. Schwern's test module and testing in general. That has me thinking about my currently incomplete test script for Net::SCP::Expect and I have some generic questions.
Is there a standard way to test modules that rely on remote connections of some sort? I mean, the goal of scp is to put a file from one system onto another. The problem is, is there a reliable way to check success or failure for something like scp?
My general feeling on the subject was that it was just easier for you, the user, to just eyeball the results. In other words, just manually check to see if it copied successfully and the file sizes are correct. Otherwise, I'm looking at a scenario where I generate my own test file, check the size, scp to a user-specified host, somehow telnet into that machine, check for the file's existence and file size, then report back to the user.
Easy enough, but ONLY if the remote host allows port 23 connections. Since you're using scp in first place, there's a good chance it won't and I certainly can't assume that it will. In that case, then the only recourse is to make them install something like Net::SSH::Perl which has an incredible number of dependencies when you factor in everything (something like 25 modules, plus a math lib). All so that I can do the equivalent of "ls -l".
Should I simply add that as an option? i.e. "If you want a *real* test, install Net::SSH::Perl. Otherwise, eyeball it".