use Cronscript
authorJason Etheridge <jason@esilibrary.com>
Thu, 22 Aug 2013 16:26:09 +0000 (12:26 -0400)
committerJason Etheridge <jason@esilibrary.com>
Thu, 22 Aug 2013 16:26:09 +0000 (12:26 -0400)
Open-ILS/src/perlmods/live_t/00-simple.t

index f6f0c02..d554242 100644 (file)
@@ -5,20 +5,11 @@ use Test::More tests => 2;
 diag("Simple tests against the open-ils.storage service and the stock test data.");
 
 use strict; use warnings;
-use OpenSRF::System;
-use OpenSRF::AppSession;
-use OpenILS::Utils::Fieldmapper;
-use OpenSRF::Utils::SettingsClient;
 
-my $config = `osrf_config --sysconfdir`;
-chomp $config;
-$config .= '/opensrf_core.xml';
-
-OpenSRF::System->bootstrap_client(config_file => $config);
-Fieldmapper->import(IDL =>
-    OpenSRF::Utils::SettingsClient->new->config_value("IDL"));
+use OpenILS::Utils::Cronscript;
+my $script = OpenILS::Utils::Cronscript->new();
  
-my $ses = OpenSRF::AppSession->create('open-ils.storage');
+my $ses = $script->session('open-ils.storage');
 my $req = $ses->request('open-ils.storage.direct.actor.user.retrieve', 1);
 if (my $resp = $req->recv) {
     if (my $user = $resp->content) {