Wednesday, December 1, 2010

a branch of SlingRuby supporting remote integration ntesting

So I branched my stuff and started in by removing localhost hardcoding.

here is the multi-session worklog:

  •  add 2 new attributes, host and port.
  •  on init parse the 'server' argument extracting host and port
  •  add accessors for host and port.
  •  these changes will make it easier to port the older scripts which hardcode a localhost value.
kern-1105.rb - tried not to change the style of this test.
  •  replace hardcoded constants with framework server instance's accessors
  •  get adminuser auth from Slingusers::User.admin_user hmm may want to do this across the board in a later sweep
kern-568.rb - this one is of interest due to the chance that the timezone of the target host may be different than that of the testing box. In order to test the timestamps across timezones I modified the tests to parse the timestamps into a common, comparable format. Tested by poking against the Indiana QA server, a far different place than Belmont California.
  • Time.parse() introduced
kern-577.rb - This test's localhost issue is in the teardown. no biggie.
Wasn't able to run consistently against the Indiana QA server. Runs fine against localhost. 3akai is having proxy errors just now.
 I am finding is that kern-577 cannot consistently create a user at Indiana, and when it does it cannot consistently create a link to the user's test-uploaded document. ( gets a 500! ) It does sometimes pass, but it sure is flakey. ( return a day or two later) OK now. To be expected in a fluid environment.
  • use Sling.url_for()
kern-797.rb - another teardown tweak
  • use Sling.url_for()
kern-854.rb - just a couple of lines, but this fails on tear-down. I'll revert to be sure that it works without changes. yep, when getWidgetServiceConfiguration is called against remote hosts ( or Indiana ) it must not return whatever is expected. Lance's page shows that 854 fails when run locally too. OK I'll move on for now :)
  • Sling.url_for() in WidgetServices methods
kern-857.rb - this is simular to 854. works OOTB against localhost, but fails against remotehost due to hardcoding localhost URL The test has a utility method 'getWidgetServiceConfiguration' which is, well, getting the service configuration. This too currently fails on the QA server, so I'll just plug along with my code localhost changes...
(later) fixed this and 854 by changing the xWidgetServicesConfiguration foo methods to use the Sling classes url_for() method. The code was putting in double slashes, which were failing.
  • Sling.url_for() in WidgetServices method
kern-891.rb - is much like kern-577 a teardown use of localhost. swapped in the url_for method :)
  • Sling.url_for()

That's it for the kern's. now for the tests. The first on my list

  is a false positive. 

 had a few hardcoded localhost URLs which I modified to use the Sling service's setup

 This test had failed because I don't have mailtrap installed in my ruby repository of gem wonder. This test runs mailtrap on localhost, so changing it to something else doesn't make sense. Now to go see what mailtrap is. yeppers. makes no sense for a remote host test. sweet.

Next Steps

Roll this stuff into my branch, then update my checkout against the current master to see what I've missed.

modify tools/runalltests.rb to contain a 'remote' blacklist. Not sure how it could tell now :) I'll take a big swing, add a "remote" flag, and have runalltests.rb do the sed stuff I posted about earlier.

use one definition for admin user. this is just clean up, but it'll make it easier for folks who change their default admin user down the road.

modify / remove timestamp based userID generation to use new User service method using random numbers. ( check speed )
extend the users module thing to centralize creation of temporary users. doing this will reduce ID collisions in multi-load/thread testing

No comments: