[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] fabtest
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] fabtest |
Date: |
Tue, 22 Feb 2011 13:00:44 -0500 |
Hey Mike,
On Sat, Feb 19, 2011 at 5:37 AM, Mike Korobov <address@hidden> wrote:
> I've recently released https://bitbucket.org/kmike/fabtest/ package.
> This package is for writing tests for Fabric scripts against
> VirtualBox VMs: before each test VM is rolled back to selected
> snapshot.
That's neat! I haven't the time to try it out right now but I'm
curious as to how long your snapshot rollbacks take (1s, 10s, 60s
etc). I use Virtualbox right now (via Vagrant) but the snapshot
functionality was somewhat buggy for me so I've not used it much.
Instead I use Vagrant's package functionality (which is semi slow but
pretty stable) and/or focus on idempotent Fabric recipes.
> Can please somebody review the code? Are there better ways to do this
> kind of things? Am I missing something in the implementation?
For running Fabric's own tests, I wrote a somewhat hacky
Paramiko-driven fake SSH/SFTP server -- it's in the master branch in
tests/server.py (with to-be-merged improvements to the SFTP stuff in
put-get-overhaul). It works reasonably well for the existing test
suite, but needs more work to be generally useful for your use case, I
think. I have vague plans to clean it up and make it its own project
sometime.
The greater discussion of "fake SSH server versus real SSH server" is
one I had a while ago and I'm reasonably happy with the route I took
for Fabric's test suite, but for "manual" testing of fabfile tasks (as
opposed to frequent runs of a large test suite) I think your approach
may have a lot of merit too. Again, I'll try to take a closer look in
a while.
-Jeff
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org