Saturday, November 20, 2010

it is not alive.

After all that exploratory dorking around I've created a tiny patch for sling.rb, in sakai3's testscripts/RubySling/lib/sling area, which adds an "is_Ready()" method.

The method returns false if
  1. there is no connection to the desired server
  2. if all of the sakai-nakamura bundles are not up and Active
which should be sufficient for helping automate the Ruby tests in a CI server context.

http://jira.sakaiproject.org/browse/SAKIII-1868

once you have that mod made you can cook up a little tester like this
#!/usr/bin/env ruby
# test to see if sakai 3 is up and all
#  sakai bundles are loaded

# assume we're running from 3AKHOME/testscripts/SlingRuby

$LOAD_PATH << './lib'

require 'sling/sling'
include SlingInterface

@s = Sling.new()
# at this point we are logged in, yes as admin
# ( it's arguable that the constructor should bailfail if S3 isn't up. )

true == @s.is_Ready() ? exit(0) : exit(1)

and use it in your testing shell scripts so they won't run if the server isn't up or isn't accessible.


One thing that struck me during all this was that if the RubySling tests could be run by a group of people against a common remote host you would have a quick way to produce additional 'load' during a bug bash. Granted it would be just-less-than-senseless load. Suitably empowered participants would just fire up the tests in a mess of shells on stray machines and let them mumble around in the background while doing ad-hoc bashing.

Looks like just a little tweaking to the tests and their setup. hmm.

No comments: