3 ms·
I don't get it. Is this intended to run unit tests on all my personal shell scripts and dohickeys? Or to run things like make sure none of my co-workers typed s
by jitl 12y ago
I don't get it. Is this intended to run unit tests on all my personal shell scripts and dohickeys? Or to run things like make sure none of my co-workers typed something silly into my .zshrc?
Serious question.
- rdc12 12y agoIt looks like you write your own tests, in the folder ~/t/ and this is a wrapper for running them all. "Now it’s time to fill your t/ folder with tests, you can start with a simple one: t/01_compile_scripts.t. It checks that every Perl script in the bin/ folder compiles. It has the following content. " and "Every test you will add in your ~/t folder will run every hour. App::Prove remembers failed tests, using ~/.prove file, and after login you will run only failed tests, so you will know which problems are going on."
- fibo 12y agoHi, I'm the article author. Thanks to posting it on HN, I got a massive traffic source :) The purpouse is to run tests periodically for a system user. A possible scenatio is, for example, you have a user "etl" that runs all ETL processes in your server. You need to check SFTP connectivity on many servers, Oracle database connections are working, NFS dirs are mounted an so on. If something is broken, you ETL processes can stop and you notice it cause your Business Intelligence reports have missing data. So what do you do if an SFTP connection is broken? At some point you will need to login as "etl" user, that holds the credentials. That's why I wrote this article! When you login, you will see running tests that failed: those test (it is supposed they) will say you where is the problem. Then you can fix it, and run again tests to check everything is ok. What is cool about "prove" is that is remembers the tests failed, so, if you have a large test base, you do not wait a lot of time that all tests run: it only run the tests you are interested in, those that you need to fix when you login. Hope it can help to clarify. Cheers, fibo
- deleted 12y ago[deleted]