[smolder-commits] SF.net SVN: smolder: [803] trunk
Brought to you by:
michael_peters
From: <mic...@us...> - 2008-07-05 01:36:21
|
Revision: 803 http://smolder.svn.sourceforge.net/smolder/?rev=803&view=rev Author: michael_peters Date: 2008-07-04 18:36:20 -0700 (Fri, 04 Jul 2008) Log Message: ----------- adding new tests for tap_stream and extra_properties Modified Paths: -------------- trunk/lib/Smolder/Dispatch.pm trunk/lib/Smolder/TestData.pm trunk/t/dev_projs.t Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Name: svk:merge - 6cb60ec2-19fc-4f48-ba02-516b4c84136d:/local/smolder:23500 ef85ff6a-427b-4ddd-bce6-61dc0fed61e7:/local/smolder/trunk:51070 + 6cb60ec2-19fc-4f48-ba02-516b4c84136d:/local/smolder:23500 ef85ff6a-427b-4ddd-bce6-61dc0fed61e7:/local/smolder/trunk:51071 Modified: trunk/lib/Smolder/Dispatch.pm =================================================================== --- trunk/lib/Smolder/Dispatch.pm 2008-07-05 01:36:10 UTC (rev 802) +++ trunk/lib/Smolder/Dispatch.pm 2008-07-05 01:36:20 UTC (rev 803) @@ -12,6 +12,10 @@ app => 'Public::Projects', rm => 'tap_stream', }, + 'developer_projects/tap_stream/:id/:stream_index' => { + app => 'Developer::Projects', + rm => 'tap_stream', + }, ':app/:rm?/:id?/:type?' => {}, ], }; Modified: trunk/lib/Smolder/TestData.pm =================================================================== --- trunk/lib/Smolder/TestData.pm 2008-07-05 01:36:10 UTC (rev 802) +++ trunk/lib/Smolder/TestData.pm 2008-07-05 01:36:20 UTC (rev 803) @@ -210,7 +210,7 @@ # set some defaults %args = ( - file => catfile( $config->get('InstallRoot'), 't', 'data', 'test_run_bad.tar.gz' ), + file => catfile( $config->get('InstallRoot'), 't', 'data', 'test_run_bad_yml.tar.gz' ), architecture => 'x386', platform => 'Linux', %args, Modified: trunk/t/dev_projs.t =================================================================== --- trunk/t/dev_projs.t 2008-07-05 01:36:10 UTC (rev 802) +++ trunk/t/dev_projs.t 2008-07-05 01:36:20 UTC (rev 803) @@ -21,7 +21,7 @@ use HTTP::Request::Common; if (is_apache_running) { - plan( tests => 94 ); + plan( tests => 104 ); } else { plan( skip_all => 'Smolder apache not running' ); } @@ -221,7 +221,7 @@ $mech->content_unlike(qr/(Added .*){11}/s); } -# 71..75 +# 71..81 # report_details { my $proj1 = _get_proj($proj1_id); @@ -231,12 +231,20 @@ $mech->follow_link_ok({n => 1, url_regex => qr/report_details/}); ok( $mech->ct, 'text/html' ); + # make sure our extra properties made it into the report + $mech->content_contains('GCC Version'); + $mech->content_contains('gcc version 4.1.2'); + $mech->content_contains('Perl version'); + $mech->content_contains('This is perl, v5.8.8'); + $mech->content_contains('uname'); + $mech->content_contains('Linux localhost.localdomain 2.6.20-1.2952.fc6'); + # individual report files $mech->get_ok("/app/developer_projects/test_file_report_details/$proj1/0"); ok( $mech->ct, 'text/html' ); } -# 76..87 +# 82..93 # smoke_report_validity { my $proj1 = _get_proj($proj1_id); @@ -280,7 +288,7 @@ ok( !$report->invalid ); } -# 88..91 +# 94..97 # single smoke_report { my $proj1 = _get_proj($proj1_id); @@ -298,7 +306,7 @@ $mech->content_contains( $dev->username ); } -# 92..94 +# 98..100 # download TAP { my $proj = _get_proj($proj1_id); @@ -316,6 +324,22 @@ cmp_ok( -s "$tmp", '==', -s $report->file, 'same size as original file'); } +# 101..104 +# download TAP stream +{ + my $proj = _get_proj($proj1_id); + + # not an admin of the project + my $report = create_smoke_report( + project => $proj, + developer => $dev, + ); + $mech->get_ok("/app/public_projects/tap_stream/$report/1"); + $mech->content_contains('ok 2'); + $mech->content_contains('ok 3 # skip'); + $mech->content_contains('1..7'); +} + sub _get_proj { my (@ids) = @_; my @projs; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |