Browse Source

Fix #145, Fix minor test & dzil issues as well

George S. Baugh 7 years ago
parent
commit
d9d8247541
4 changed files with 11 additions and 14 deletions
  1. 4 7
      dist.ini
  2. 1 1
      lib/Test/Rail/Parser.pm
  3. 1 1
      lib/TestRail/API.pm
  4. 5 5
      t/TestRail-Utils-Find.t

+ 4 - 7
dist.ini

@@ -6,12 +6,6 @@ license = Perl_5
 copyright_holder = George S. Baugh
 
 [MetaResources]
-bugtracker.web    = https://rt.cpan.org/Public/Dist/Display.html?Name=TestRail-API
-bugtracker.mailto = bug-TestRail-API@rt.cpan.org
-repository.url    = git://github.com/teodesian/TestRail-Perl.git
-repository.web    = https://github.com/teodesian/TestRail-Perl
-repository.type   = git
-homepage          = https://github.com/teodesian/TestRail-Perl
 
 [GatherDir]
 include_dotfiles = 1
@@ -143,6 +137,10 @@ stopwords = csv
 module = Dist::Zilla
 check_all_plugins = 1
 
+[GithubMeta]
+issues = 1
+user = teodesian
+
 [CheckMetaResources]
 [CheckPrereqsIndexed]
 [CheckChangesHasContent]
@@ -156,6 +154,5 @@ check_all_plugins = 1
 
 [TidyAll]
 
-[Signature]
 
 [Git::CommitBuild]

+ 1 - 1
lib/Test/Rail/Parser.pm

@@ -597,7 +597,7 @@ sub _set_result {
 
     print "# Test elapsed: ".$options->{'elapsed'}."\n" if $options->{'elapsed'};
 
-    print "# Attempting to find case by title '".$test_name." in run $run_id'...\n";
+    print "# Attempting to find case by title '".$test_name."' in run $run_id...\n";
     $tc = $self->{'tr_opts'}->{'testrail'}->getTestByName($run_id,$test_name);
     if (!defined($tc) || (reftype($tc) || 'undef') ne 'HASH') {
         cluck("ERROR: Could not find test case: $tc");

+ 1 - 1
lib/TestRail/API.pm

@@ -76,7 +76,7 @@ Creates new C<TestRail::API> object.
 
 =item BOOLEAN C<DO_POST_REDIRECT> (optional) - Follow redirects on POST requests (most add/edit/delete calls are POSTs).  Default false.
 
-=item INTEGER C<MAX_TRIES> (optional) - Try requests up to X number of times if they fail with anything other than 401/403.  Useful with flaky external auth, or timeout issues.  Default 1.
+=item INTEGER C<MAX_TRIES> (optional) - Try requests up to X number of times if they fail with anything other than 401/403.  Useful with flaky external authenticators, or timeout issues.  Default 1.
 
 =back
 

+ 5 - 5
t/TestRail-Utils-Find.t

@@ -105,7 +105,7 @@ $opts->{'extension'} = '.test';
 is(scalar(grep {$_ eq 'skipall.test'} @tests),0,"Tests in tree are not returned in no-match mode");
 is(scalar(grep {$_ eq 'NOT SO SEARED AFTER ALL'} @tests),0,"Tests not in tree that do exist are not returned in no-match mode");
 is(scalar(grep {$_ eq $FindBin::Bin.'/faker.test'} @tests),1,"Orphan Tests in tree ARE returned in no-match mode");
-is(scalar(@tests),5,"Correct number of non-existant cases shown (no-match, names-only)");
+is(scalar(@tests),6,"Correct number of non-existant cases shown (no-match, names-only)");
 
 $opts->{'configs'} = ['testPlatform1'];
 isnt(exception { TestRail::Utils::Find::getTests($opts,$tr) } , undef,"Correct number of non-existant cases shown (no-match, names-only)");
@@ -115,13 +115,13 @@ delete $opts->{'names-only'};
 @tests = TestRail::Utils::Find::findTests($opts,@$cases);
 my @filtered_tests = grep {defined $_} map {$_->{'full_title'}} @tests;
 is(scalar(@filtered_tests),0,"Full titles not returned in no-match mode");
-is(scalar(@tests),5,"Correct number of nonexistant cases shown in no-match mode");
+is(scalar(@tests),6,"Correct number of nonexistant cases shown in no-match mode");
 
 delete $opts->{'no-recurse'};
 $opts->{'names-only'} = 1;
 ($cases) = TestRail::Utils::Find::getTests($opts,$tr);
 @tests = TestRail::Utils::Find::findTests($opts,@$cases);
-is(scalar(@tests),9,"Correct number of non-existant cases shown (no-match, names-only, recurse)");
+is(scalar(@tests),10,"Correct number of non-existant cases shown (no-match, names-only, recurse)");
 
 #mutual excl
 $opts->{'match'} = $FindBin::Bin;
@@ -198,7 +198,7 @@ is($output->{'update'},undef,'No update cases returned');
 
 delete $opts->{'no-missing'};
 $output = TestRail::Utils::Find::findCases($opts,@$cases);
-is(scalar(@{$output->{'missing'}}),11,'Correct number of missing cases returned');
+is(scalar(@{$output->{'missing'}}),12,'Correct number of missing cases returned');
 is($output->{'orphans'},undef,'No orphan cases returned');
 is($output->{'update'},undef,'No update cases returned');
 
@@ -221,7 +221,7 @@ is($output->{'update'}->[0]->{'title'},'fake.test',"Correct update case return")
 delete $opts->{'no-missing'};
 $opts->{'orphans'} = 1;
 $output = TestRail::Utils::Find::findCases($opts,@$cases);
-is(scalar(@{$output->{'missing'}}),11,'Correct number of missing cases returned');
+is(scalar(@{$output->{'missing'}}),12,'Correct number of missing cases returned');
 is(scalar(@{$output->{'orphans'}}),1,'1 orphan case returned');
 is(scalar(@{$output->{'update'}}),1,'1 update case returned');