in reply to Test code that makes filesystem modifications?
Should I knowingly put code in a test suite that intentionally makes changes to the state of a system?That depends what you mean by changing the state of a system. If it's just a matter of creating (and afterwards deleting) of files, and it's done in the tmp directory, go ahead, that's what the tmp directory is for. But if it's anything non-trivial, like opening ports, or doing something that would require root/admin priviledges, never, ever do something without 1) clearly stating to the user what you are about to do, and 2) explicitly asking the user for permission. And by all means, try to determine whether you are run from an interactive session or not, and if not, don't do the tests.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Test code that makes filesystem modifications?
by tovod-everett (Sexton) on Mar 04, 2004 at 17:43 UTC |