[Sputnik-list] sputnik-uid, versium.storage.virtual and unit tests

Jim Whitehead II jnwhiteh at gmail.com
Fri Mar 21 09:58:40 GMT+2 2008


I've merged the sputnik-uid code into the sputnik core, allowing for
the following API:

- uid = sputnik:get_uid(namespace, type)
- name = sputnik:gen_name(namespace, type, format)

In addition I have pushed a new versium storage module called
'virtual'.  This is a non-persistent storage module that can be used
for testing purposes.  It stores the data directly in a Lua table and
allows for quick testing without requiring a directory to store data.
This was created in the hope that I'll be able to get a more generic
testing suite set up for Sputnik that allows us to test the API as we
continue work.  This will help us catch any regressions and contribs
that much better.

To that end, I've created a tests directory which contains a single
file 'version.storage.virtual' that is expected to be run by the
'shake' utility.  The shell script run.sh in tests allows you to
easily run the test, once the shake rock is installed.  I wrote some
tests for the generic versium interface to the virtual storage layer
to make sure it works as expected.

Shaking the tree...

-> storage/virtual test.lua OK!
_________________

Tests: 44
Failures: 0
Errors: 0

- Jim



More information about the Sputnik-list mailing list