whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Add some test data
Date Mon, 27 May 2019 22:47:14 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 612afc8  Add some test data
612afc8 is described below

commit 612afc862076343eadeb508a2130207d4a4b5c03
Author: Sebb <sebb@apache.org>
AuthorDate: Mon May 27 23:47:10 2019 +0100

    Add some test data
---
 lib/spec/lib/mail/mail_spec.rb    | 18 +++++++++++++-----
 lib/test/svn/apmail_bin/.archives | 17 +++++++++++++++++
 2 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/lib/spec/lib/mail/mail_spec.rb b/lib/spec/lib/mail/mail_spec.rb
index a98b29f..0d01eff 100644
--- a/lib/spec/lib/mail/mail_spec.rb
+++ b/lib/spec/lib/mail/mail_spec.rb
@@ -27,10 +27,14 @@ describe ASF::Mail do
 
   describe '.cansub(member, pmc_chair, ldap_pmcs)' do
     lists = ASF::Mail.cansub(false, false, nil)
-    it 'should return public lists only', :skip => TEST_DATA do
+    it 'should return public lists only' do
       whitelist = ['infra-users', 'jobs', 'site-dev', 'committers-cvs', 'site-cvs', 'concom',
'party']
       board = ['board', 'board-commits', 'board-chat']
-      expect(lists.length).to be >= 1000 
+      if TEST_DATA
+        expect(lists.length).to be >= 7 
+      else
+          expect(lists.length).to be >= 1000
+      end
       expect(lists).not_to include('private')
       expect(lists).not_to include('security')
       expect(lists).to include(*whitelist)
@@ -40,7 +44,7 @@ describe ASF::Mail do
       mylists = ASF::Mail.cansub(false, false, []) - lists
       expect(mylists.length).to be(0)
     end
-    it 'should return private PMC lists', :skip => TEST_DATA do
+    it 'should return private PMC lists' do
       mylists = ASF::Mail.cansub(false, false, ['ant','whimsical']) - lists
       expect(mylists.length).to be(2)
       expect(mylists).to include('ant-private','whimsical-private')
@@ -49,8 +53,12 @@ describe ASF::Mail do
       mylists = ASF::Mail.cansub(false, false, ['xxxant','xxxwhimsical']) - lists
       expect(mylists.length).to be(0)
     end
-    it 'should return private PPMC lists', :skip => TEST_DATA do
-      podnames = ASF::Podling.current.map(&:name)
+    it 'should return private PPMC lists' do
+      if TEST_DATA
+        podnames = ['pod1','pod2']
+      else
+        podnames = ASF::Podling.current.map(&:name)
+      end
       mylists = ASF::Mail.cansub(false, false, podnames) - lists
       expect(mylists.length).to be_between(podnames.length-2, podnames.length).inclusive
# mailing list may not be set up yet
     end
diff --git a/lib/test/svn/apmail_bin/.archives b/lib/test/svn/apmail_bin/.archives
index e69de29..35ef443 100644
--- a/lib/test/svn/apmail_bin/.archives
+++ b/lib/test/svn/apmail_bin/.archives
@@ -0,0 +1,17 @@
+# Sample archive data for testing
+ "jobs", "/home/apmail/private-arch/",
+ "infra-users", "/home/apmail/private-arch/",
+ "site-dev", "/home/apmail/public-arch/",
+ "site-cvs", "/home/apmail/private-arch/",
+ "committers-cvs", "/home/apmail/private-arch/",
+ "concom", "/home/apmail/private-arch/",
+ "party", "/home/apmail/private-arch/",
+ "board", "/home/apmail/private-arch/",
+ "board-commits", "/home/apmail/private-arch/",
+ "board-chat", "/home/apmail/private-arch/",
+ "ant-private", "/home/apmail/private-arch/",
+ "whimsical-private", "/home/apmail/private-arch/",
+ "pod1-commits", "/home/apmail/public-arch/",
+ "pod2-dev", "/home/apmail/public-arch/",
+ "pod3-private", "/home/apmail/private-arch/",
+ 
\ No newline at end of file


Mime
View raw message