[Bps-public-commit] SD branch, master, updated. eba358f0532a8136677306decaf6c51e2c446a21

spang at bestpractical.com spang at bestpractical.com
Fri Aug 14 12:00:11 EDT 2009


The branch, master has been updated
       via  eba358f0532a8136677306decaf6c51e2c446a21 (commit)
       via  2453aa8913a9651a5c13a9dd3787bc58f16ff4f0 (commit)
      from  84cb81e3a2286cb6c9d9409c355abdeeba153098 (commit)

Summary of changes:
 lib/App/SD/Replica/redmine/PullEncoder.pm |    2 +-
 t/sd-redmine/README                       |   34 +++++++++++++++++++++++++++++
 t/sd-redmine/basic.t                      |    7 +++++-
 t/sd-redmine/net_redmine_test.pl          |    2 +-
 4 files changed, 42 insertions(+), 3 deletions(-)
 create mode 100644 t/sd-redmine/README
 mode change 100644 => 100755 t/sd-redmine/net_redmine_test.pl

- Log -----------------------------------------------------------------
commit 2453aa8913a9651a5c13a9dd3787bc58f16ff4f0
Author: Christine Spang <spang at bestpractical.com>
Date:   Fri Aug 14 14:29:51 2009 +0100

    Comment out 'use YAML::XS' in redmine's PullEncoder since only commented
    debug code uses it.

diff --git a/lib/App/SD/Replica/redmine/PullEncoder.pm b/lib/App/SD/Replica/redmine/PullEncoder.pm
index b5ce37e..1fe3753 100644
--- a/lib/App/SD/Replica/redmine/PullEncoder.pm
+++ b/lib/App/SD/Replica/redmine/PullEncoder.pm
@@ -2,7 +2,7 @@ package App::SD::Replica::redmine::PullEncoder;
 use Any::Moose;
 extends 'App::SD::ForeignReplica::PullEncoder';
 
-use YAML::XS qw(Dump);
+# use YAML::XS qw(Dump);
 use Params::Validate qw(:all);
 
 has sync_source => (

commit eba358f0532a8136677306decaf6c51e2c446a21
Author: Christine Spang <spang at bestpractical.com>
Date:   Fri Aug 14 16:59:14 2009 +0100

    Document what's necessary to get the redmine tests running.right now,
    and TODO the push test since the push encoder for redmine is not yet
    implemented.

diff --git a/t/sd-redmine/README b/t/sd-redmine/README
new file mode 100644
index 0000000..0ee3005
--- /dev/null
+++ b/t/sd-redmine/README
@@ -0,0 +1,34 @@
+How to get the SD Redmine sync tests working
+--------------------------------------------
+
+* Install Net::Redmine and any other dependencies of the Redmine sync listed
+  in Makefile.PL
+
+* You need access to an instance of a recent version of a Redmine instance with
+  a test project. You can run a Redmine instance locally by downloading it from
+  here:
+  - http://www.redmine.org/wiki/redmine/Download
+
+  Follow the installation instructions here:
+  - http://www.redmine.org/wiki/redmine/RedmineInstall
+
+  Once you have a local server up and running (probably under WEBrick, go to
+  http://localhost:3000/, login with username 'admin', password 'admin'. Create
+  a project named 'test'.
+
+* Set NET_REDMINE_TEST to "http://localhost:3000/projects/test admin admin"
+  (Sub in different test project URL and username/password if yours are
+  different.)
+
+* Tests should at least run now. This foreign sync module is experimental as
+  of yet; some of them may fail. The tests also currently depend on having
+  no issues in the redmine test project when they start right now, so you'll
+  need to clear tickets by going to the "issues" UI for the test project in a
+  browser, selecting all the issues by clicking the green checkbox, and then
+  right-clicking in the table to bring up a menu that you can delete them
+  from.
+
+* In the future, we should make it so these tests require less setup on the
+  part of the developer, and maybe create a new redmine project for every
+  run (or some other way of not needing to manually delete tickets after
+  every run).
diff --git a/t/sd-redmine/basic.t b/t/sd-redmine/basic.t
index cc53f7f..b9a304d 100644
--- a/t/sd-redmine/basic.t
+++ b/t/sd-redmine/basic.t
@@ -50,7 +50,12 @@ diag($err);
 
 note "verify the update with Net::Redmine";
 my $ticket = $r->lookup(ticket => { id => $tickets[0]->id });
-is($ticket->status, "Closed");
+
+TODO: {
+    local $TODO = 'write support is not yet implemented';
+
+    is($ticket->status, "Closed");
+};
 
 ##
 sub count_tickets_in_sd {
diff --git a/t/sd-redmine/net_redmine_test.pl b/t/sd-redmine/net_redmine_test.pl
old mode 100644
new mode 100755
index 4611775..c449257
--- a/t/sd-redmine/net_redmine_test.pl
+++ b/t/sd-redmine/net_redmine_test.pl
@@ -1,5 +1,5 @@
 unless ($_ = $ENV{NET_REDMINE_TEST}) {
-    plan skip_all => "Need NET_REDMINE_TEST env var";
+    plan skip_all => "Need NET_REDMINE_TEST env var set to '<project url> <username> <password>'";
     exit;
 }
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list