Преглед изворни кода

Fix #98 - remove references to TestLink

George S. Baugh пре 9 година
родитељ
комит
30af18d002
4 измењених фајлова са 11 додато и 11 уклоњено
  1. 1 1
      bin/testrail-report
  2. 1 1
      lib/App/Prove/Plugin/TestRail.pm
  3. 2 2
      lib/TestRail/API.pm
  4. 7 7
      t/App-Prove-Plugin-Testrail.t

+ 1 - 1
bin/testrail-report

@@ -9,7 +9,7 @@
 
   prove -v sometest.t | testrail-report [OPTIONS]
 
-  prove -PTestRail='apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,run=TestRun,plan=TestPlan,configs=Config1:Config2:Config3,version=0.014' sometest.t
+  prove -PTestRail='apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,run=TestRun,plan=TestPlan,configs=Config1:Config2:Config3,version=0.014' sometest.t
 
   require `which testrail-report`;
   TestRail::Bin::Report::run('args' => @args);

+ 1 - 1
lib/App/Prove/Plugin/TestRail.pm

@@ -12,7 +12,7 @@ use TestRail::Utils;
 
 =head1 SYNOPSIS
 
-`prove -PTestRail='apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,run=TestRun,plan=TestPlan,configs=Config1:Config2:Config3,version=0.014' sometest.t`
+`prove -PTestRail='apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,run=TestRun,plan=TestPlan,configs=Config1:Config2:Config3,version=0.014' sometest.t`
 
 =cut
 

+ 2 - 2
lib/TestRail/API.pm

@@ -7,8 +7,8 @@ package TestRail::API;
 
     use TestRail::API;
 
-    my ($username,$password,$host) = ('foo','bar','testlink.baz.foo');
-    my $tr = TestRail::API->new($username, $password, $host);
+    my ($username,$password,$host) = ('foo','bar','http://testrail.baz.foo');
+    my $tr = TestRail::API->new($host, $username, $password);
 
 =head1 DESCRIPTION
 

+ 7 - 7
t/App-Prove-Plugin-Testrail.t

@@ -17,42 +17,42 @@ $ENV{'TESTRAIL_MOCKED'} = 1;
 
 #Test the same sort of data as would come from the Test::Rail::Parser case
 my $prove = App::Prove->new();
-$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,run=TestingSuite,version=0.014",'t/fake.test');
+$prove->process_args("-PTestRail=apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,run=TestingSuite,version=0.014",'t/fake.test');
 
 is (exception { capture { $prove->run() } },undef,"Running TR parser case via plugin functions");
 
 #Check that plan, configs and version also make it through
 $prove = App::Prove->new();
-$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,run=Executing the great plan,version=0.014,plan=GosPlan,configs=testConfig",'t/fake.test');
+$prove->process_args("-PTestRail=apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,run=Executing the great plan,version=0.014,plan=GosPlan,configs=testConfig",'t/fake.test');
 
 is (exception { capture { $prove->run() } },undef,"Running TR parser case via plugin functions works with configs/plans");
 
 #Check that spawn options make it through
 
 $prove = App::Prove->new();
-$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,run=TestingSuite2,version=0.014,testsuite_id=9",'t/skipall.test');
+$prove->process_args("-PTestRail=apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,run=TestingSuite2,version=0.014,testsuite_id=9",'t/skipall.test');
 
 is (exception { capture { $prove->run() } },undef,"Running TR parser case via plugin functions works with configs/plans");
 
 $prove = App::Prove->new();
-$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,plan=bogoPlan,run=bogoRun,version=0.014,testsuite=HAMBURGER-IZE HUMANITY",'t/skipall.test');
+$prove->process_args("-PTestRail=apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,plan=bogoPlan,run=bogoRun,version=0.014,testsuite=HAMBURGER-IZE HUMANITY",'t/skipall.test');
 
 is (exception { capture { $prove->run() } },undef,"Running TR parser spawns both runs and plans");
 
 $prove = App::Prove->new();
-$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,run=bogoRun,version=0.014,testsuite_id=9,sections=fake.test:CARBON LIQUEFACTION",'t/fake.test');
+$prove->process_args("-PTestRail=apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,run=bogoRun,version=0.014,testsuite_id=9,sections=fake.test:CARBON LIQUEFACTION",'t/fake.test');
 
 is (exception { capture { $prove->run() } },undef,"Running TR parser can discriminate by sections correctly");
 
 $prove = App::Prove->new();
-$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,plan=FinalPlan,run=FinalRun,configs=testConfig,version=0.014,autoclose=1",'t/fake.test');
+$prove->process_args("-PTestRail=apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,plan=FinalPlan,run=FinalRun,configs=testConfig,version=0.014,autoclose=1",'t/fake.test');
 
 is (exception { capture { $prove->run() } },undef,"Running TR parser with autoclose works correctly");
 
 #Test multi-job upload shizz
 #Note that I don't care if it even uploads, just that it *would have* done so correctly.
 $prove = App::Prove->new();
-$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,plan=FinalPlan,run=FinalRun,configs=testConfig,step_results=step_results", '-j2', 't/fake.test', 't/skipall.test');
+$prove->process_args("-PTestRail=apiurl=http://some.testrail.install/,user=someUser,password=somePassword,project=TestProject,plan=FinalPlan,run=FinalRun,configs=testConfig,step_results=step_results", '-j2', 't/fake.test', 't/skipall.test');
 
 is (exception { capture { $prove->run() } },undef,"Running TR parser -j2 works");