about summary refs log tree commit diff
path: root/t/008_git_clone.t
diff options
context:
space:
mode:
authorJonathan "Duke" Leto <jonathan@leto.net>2011-05-22 23:01:33 -0700
committerJonathan "Duke" Leto <jonathan@leto.net>2011-05-22 23:01:33 -0700
commitf4127b1235b585b5d82082fcfd820b68479ceba4 (patch)
tree32042a41db19953f03797d46de59f0d6d4d13f7c /t/008_git_clone.t
parentUpdate index route tests to be less fragile, since we now have tests that cre... (diff)
downloadjitterbug-f4127b1235b585b5d82082fcfd820b68479ceba4.tar.gz
Add a test to verify we get the expected sha1
Diffstat (limited to '')
-rw-r--r--t/008_git_clone.t12
1 files changed, 9 insertions, 3 deletions
diff --git a/t/008_git_clone.t b/t/008_git_clone.t
index 6e33018..5a7f915 100644
--- a/t/008_git_clone.t
+++ b/t/008_git_clone.t
@@ -1,4 +1,4 @@
-use Test::More tests => 3;
+use Test::More tests => 4;
 use Test::Exception;
 use strict;
 use warnings;
@@ -49,11 +49,17 @@ if (can_run('git')){
     my $gitrepo = "t/data/testing";
     dircopy "$gitrepo/._git_", "$gitrepo/.git" unless -e "$gitrepo/.git";
 
-    lives_ok sub { system("$^X scripts/post_to_hook.pl") }, 'post_to_hook.pl lives';
+    lives_ok sub { system("$^X -Ilib scripts/post_to_hook.pl") }, 'post_to_hook.pl lives';
 
-    lives_ok sub { system("$^X scripts/builder.pl -c t/data/test.yml -C") }, 'builder.pl lives';
+
+    lives_ok sub { # $ENV{DEBUG} = 1;
+        system("$^X -Ilib scripts/builder.pl -c t/data/test.yml -C")
+    }, 'builder.pl lives';
 
     ok(-e "t/tmp/build/testing/.git", 'found a testing git repo');
+    chdir "t/tmp/build/testing";
+    chomp( my $sha1 = qx{git rev-parse HEAD} );
+    is($sha1,"3ab75b9a29e09bf027f64250b44cab19b316c128", "got expected sha1 in repo");
 } else {
     skip "Git not available, skipping tests", 3;
 }