cerberus 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +159 -129
- data/LICENSE +21 -21
- data/README +75 -75
- data/Rakefile +161 -159
- data/bin/cerberus +2 -2
- data/lib/cerberus/builder/maven2.rb +38 -38
- data/lib/cerberus/builder/rake.rb +7 -7
- data/lib/cerberus/builder/rant.rb +7 -7
- data/lib/cerberus/builder/rspec.rb +13 -0
- data/lib/cerberus/builder/ruby_base.rb +48 -47
- data/lib/cerberus/cli.rb +73 -70
- data/lib/cerberus/component_lazy_loader.rb +2 -0
- data/lib/cerberus/config.example.yml +28 -28
- data/lib/cerberus/config.rb +47 -46
- data/lib/cerberus/constants.rb +8 -8
- data/lib/cerberus/latch.rb +26 -26
- data/lib/cerberus/manager.rb +296 -267
- data/lib/cerberus/publisher/base.rb +47 -47
- data/lib/cerberus/publisher/gmailer.rb +17 -0
- data/lib/cerberus/publisher/irc.rb +27 -27
- data/lib/cerberus/publisher/jabber.rb +25 -25
- data/lib/cerberus/publisher/mail.rb +36 -36
- data/lib/cerberus/publisher/netsmtp_tls_fix.rb +66 -66
- data/lib/cerberus/publisher/rss.rb +27 -28
- data/lib/cerberus/scm/cvs.rb +48 -48
- data/lib/cerberus/scm/darcs.rb +70 -70
- data/lib/cerberus/scm/svn.rb +83 -83
- data/lib/cerberus/utils.rb +156 -156
- data/test/config_test.rb +45 -45
- data/test/functional_test.rb +288 -287
- data/test/integration_test.rb +104 -104
- data/test/irc_publisher_test.rb +18 -18
- data/test/jabber_publisher_test.rb +21 -21
- data/test/mail_publisher_test.rb +25 -25
- data/test/maven2_builer_test.rb +81 -81
- data/test/mock/irc.rb +20 -20
- data/test/mock/manager.rb +10 -10
- data/test/mock/xmpp4r.rb +19 -19
- data/test/rss_publisher_test.rb +21 -21
- data/test/test_helper.rb +105 -105
- metadata +58 -40
- data/lib/cerberus/helper/xchar.rb +0 -61
data/test/integration_test.rb
CHANGED
@@ -1,105 +1,105 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
2
|
-
|
3
|
-
require 'yaml'
|
4
|
-
|
5
|
-
class IntegrationTest < Test::Unit::TestCase
|
6
|
-
def setup
|
7
|
-
FileUtils.rm_rf HOME
|
8
|
-
end
|
9
|
-
|
10
|
-
def teardown
|
11
|
-
FileUtils.rm_rf HOME
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_add_project_as_url
|
15
|
-
output = run_cerb(" add #{SVN_URL} ")
|
16
|
-
assert_match /has been added to Cerberus successfully/, output
|
17
|
-
assert File.exists?(HOME + '/config/svn_repo.yml')
|
18
|
-
assert_equal SVN_URL, load_yml(HOME + '/config/svn_repo.yml')['scm']['url']
|
19
|
-
|
20
|
-
#try to add second time
|
21
|
-
output = run_cerb("add #{SVN_URL}")
|
22
|
-
assert_match /already present/, output
|
23
|
-
assert File.exists?(HOME + '/config/svn_repo.yml')
|
24
|
-
assert_equal SVN_URL, load_yml(HOME + '/config/svn_repo.yml')['scm']['url']
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_list_command
|
28
|
-
run_cerb(" add #{SVN_URL} APPLICATION_NAME=mamba ")
|
29
|
-
output = run_cerb('list')
|
30
|
-
assert_match /mamba/, output
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_add_project_with_parameters
|
34
|
-
output = run_cerb(" add #{SVN_URL} APPLICATION_NAME=hello_world RECIPIENTS=aa@gmail.com BUILDER=maven2")
|
35
|
-
assert_match /has been added to Cerberus successfully/, output
|
36
|
-
|
37
|
-
assert File.exists?(HOME + '/config/hello_world.yml')
|
38
|
-
cfg = load_yml(HOME + '/config/hello_world.yml')
|
39
|
-
|
40
|
-
assert_equal 'svn', cfg['scm']['type']
|
41
|
-
assert_equal SVN_URL, cfg['scm']['url']
|
42
|
-
assert_equal 'aa@gmail.com', cfg['publisher']['mail']['recipients']
|
43
|
-
assert_equal 'maven2', cfg['builder']['type']
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_run_project
|
47
|
-
add_application('svn_repo', SVN_URL, 'quiet' => true)
|
48
|
-
|
49
|
-
run_cerb("build svn_repo")
|
50
|
-
assert File.exists?(HOME + '/work/svn_repo/status.log')
|
51
|
-
assert build_successful?(HOME + '/work/svn_repo/status.log')
|
52
|
-
end
|
53
|
-
|
54
|
-
def test_add_darcs_scm
|
55
|
-
output = run_cerb(" add #{DARCS_URL} SCM=darcs")
|
56
|
-
assert_match /has been added to Cerberus successfully/, output
|
57
|
-
|
58
|
-
assert File.exists?(HOME + '/config/darcs_repo.yml')
|
59
|
-
cfg = load_yml(HOME + '/config/darcs_repo.yml')
|
60
|
-
|
61
|
-
assert_equal 'darcs', cfg['scm']['type']
|
62
|
-
assert_equal DARCS_URL, cfg['scm']['url']
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_run_unexist_project
|
66
|
-
output = run_cerb("build some_project")
|
67
|
-
assert_match /Project 'some_project' does not present in Cerberus/, output
|
68
|
-
assert !test(?d, HOME + '/work/some_project')
|
69
|
-
end
|
70
|
-
|
71
|
-
def test_add_cvs_explicit_scm
|
72
|
-
output = run_cerb('add :pserver:webdev1:/home/cvs SCM=cvs APPLICATION_NAME=myapp RECIPIENTS=my.email@xxx.xx')
|
73
|
-
assert_match /NotImplementedError/, output
|
74
|
-
# assert_match /has been added to Cerberus successfully/, output
|
75
|
-
|
76
|
-
# cfg = load_yml(HOME + '/config/darcs_repo.yml')
|
77
|
-
# assert_equal 'cvs', cfg['scm']['type']
|
78
|
-
end
|
79
|
-
|
80
|
-
def test_add_cvs_implicit_scm
|
81
|
-
output = run_cerb('add :pserver:webdev1:/home/cvs APPLICATION_NAME=myapp RECIPIENTS=my.email@xxx.xx')
|
82
|
-
assert_match /NotImplementedError/, output
|
83
|
-
# assert_match /has been added to Cerberus successfully/, output
|
84
|
-
|
85
|
-
# cfg = load_yml(HOME + '/config/darcs_repo.yml')
|
86
|
-
# assert_equal 'cvs', cfg['scm']['type']
|
87
|
-
end
|
88
|
-
|
89
|
-
def test_hook
|
90
|
-
some_number = rand(100000)
|
91
|
-
tmp_file = File.join(TEMP_DIR, 'some_number')
|
92
|
-
config_file = HOME + '/config/hooks.yml'
|
93
|
-
|
94
|
-
add_application('hooks', SVN_URL, 'quiet' => true)
|
95
|
-
cfg = load_yml(config_file)
|
96
|
-
|
97
|
-
cfg['hook'] = {'echo' => {'action' => "echo #{some_number} > #{tmp_file}"}}
|
98
|
-
dump_yml(config_file, cfg)
|
99
|
-
|
100
|
-
File.rm_f tmp_file
|
101
|
-
run_cerb("build hooks")
|
102
|
-
assert_equal some_number.to_s, IO.read(tmp_file).strip
|
103
|
-
File.rm_f tmp_file
|
104
|
-
end
|
1
|
+
require File.dirname(__FILE__) + '/test_helper'
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
class IntegrationTest < Test::Unit::TestCase
|
6
|
+
def setup
|
7
|
+
FileUtils.rm_rf HOME
|
8
|
+
end
|
9
|
+
|
10
|
+
def teardown
|
11
|
+
FileUtils.rm_rf HOME
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_add_project_as_url
|
15
|
+
output = run_cerb(" add #{SVN_URL} ")
|
16
|
+
assert_match /has been added to Cerberus successfully/, output
|
17
|
+
assert File.exists?(HOME + '/config/svn_repo.yml')
|
18
|
+
assert_equal SVN_URL, load_yml(HOME + '/config/svn_repo.yml')['scm']['url']
|
19
|
+
|
20
|
+
#try to add second time
|
21
|
+
output = run_cerb("add #{SVN_URL}")
|
22
|
+
assert_match /already present/, output
|
23
|
+
assert File.exists?(HOME + '/config/svn_repo.yml')
|
24
|
+
assert_equal SVN_URL, load_yml(HOME + '/config/svn_repo.yml')['scm']['url']
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_list_command
|
28
|
+
run_cerb(" add #{SVN_URL} APPLICATION_NAME=mamba ")
|
29
|
+
output = run_cerb('list')
|
30
|
+
assert_match /mamba/, output
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_add_project_with_parameters
|
34
|
+
output = run_cerb(" add #{SVN_URL} APPLICATION_NAME=hello_world RECIPIENTS=aa@gmail.com BUILDER=maven2")
|
35
|
+
assert_match /has been added to Cerberus successfully/, output
|
36
|
+
|
37
|
+
assert File.exists?(HOME + '/config/hello_world.yml')
|
38
|
+
cfg = load_yml(HOME + '/config/hello_world.yml')
|
39
|
+
|
40
|
+
assert_equal 'svn', cfg['scm']['type']
|
41
|
+
assert_equal SVN_URL, cfg['scm']['url']
|
42
|
+
assert_equal 'aa@gmail.com', cfg['publisher']['mail']['recipients']
|
43
|
+
assert_equal 'maven2', cfg['builder']['type']
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_run_project
|
47
|
+
add_application('svn_repo', SVN_URL, 'quiet' => true)
|
48
|
+
|
49
|
+
run_cerb("build svn_repo")
|
50
|
+
assert File.exists?(HOME + '/work/svn_repo/status.log')
|
51
|
+
assert build_successful?(HOME + '/work/svn_repo/status.log')
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_add_darcs_scm
|
55
|
+
output = run_cerb(" add #{DARCS_URL} SCM=darcs")
|
56
|
+
assert_match /has been added to Cerberus successfully/, output
|
57
|
+
|
58
|
+
assert File.exists?(HOME + '/config/darcs_repo.yml')
|
59
|
+
cfg = load_yml(HOME + '/config/darcs_repo.yml')
|
60
|
+
|
61
|
+
assert_equal 'darcs', cfg['scm']['type']
|
62
|
+
assert_equal DARCS_URL, cfg['scm']['url']
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_run_unexist_project
|
66
|
+
output = run_cerb("build some_project")
|
67
|
+
assert_match /Project 'some_project' does not present in Cerberus/, output
|
68
|
+
assert !test(?d, HOME + '/work/some_project')
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_add_cvs_explicit_scm
|
72
|
+
output = run_cerb('add :pserver:webdev1:/home/cvs SCM=cvs APPLICATION_NAME=myapp RECIPIENTS=my.email@xxx.xx')
|
73
|
+
assert_match /NotImplementedError/, output
|
74
|
+
# assert_match /has been added to Cerberus successfully/, output
|
75
|
+
|
76
|
+
# cfg = load_yml(HOME + '/config/darcs_repo.yml')
|
77
|
+
# assert_equal 'cvs', cfg['scm']['type']
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_add_cvs_implicit_scm
|
81
|
+
output = run_cerb('add :pserver:webdev1:/home/cvs APPLICATION_NAME=myapp RECIPIENTS=my.email@xxx.xx')
|
82
|
+
assert_match /NotImplementedError/, output
|
83
|
+
# assert_match /has been added to Cerberus successfully/, output
|
84
|
+
|
85
|
+
# cfg = load_yml(HOME + '/config/darcs_repo.yml')
|
86
|
+
# assert_equal 'cvs', cfg['scm']['type']
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_hook
|
90
|
+
some_number = rand(100000)
|
91
|
+
tmp_file = File.join(TEMP_DIR, 'some_number')
|
92
|
+
config_file = HOME + '/config/hooks.yml'
|
93
|
+
|
94
|
+
add_application('hooks', SVN_URL, 'quiet' => true)
|
95
|
+
cfg = load_yml(config_file)
|
96
|
+
|
97
|
+
cfg['hook'] = {'echo' => {'action' => "echo #{some_number} > #{tmp_file}"}}
|
98
|
+
dump_yml(config_file, cfg)
|
99
|
+
|
100
|
+
File.rm_f tmp_file
|
101
|
+
run_cerb("build hooks")
|
102
|
+
assert_equal some_number.to_s, IO.read(tmp_file).strip
|
103
|
+
File.rm_f tmp_file
|
104
|
+
end
|
105
105
|
end
|
data/test/irc_publisher_test.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
2
|
-
|
3
|
-
require 'cerberus/publisher/irc'
|
4
|
-
require 'cerberus/config'
|
5
|
-
require 'mock/irc'
|
6
|
-
require 'mock/manager'
|
7
|
-
|
8
|
-
class IRCPublisherTest < Test::Unit::TestCase
|
9
|
-
def test_publisher
|
10
|
-
options = Cerberus::Config.new(nil, :publisher => {:irc => {:channel => 'hello'}}, :application_name => 'IrcApp')
|
11
|
-
build = DummyManager.new('last message', 'this is output', 1232, 'anatol')
|
12
|
-
|
13
|
-
Cerberus::Publisher::IRC.publish(build_status(true), build, options)
|
14
|
-
|
15
|
-
assert IRCConnection.connected
|
16
|
-
# assert_equal 1, IRCConnection.messages.size
|
17
|
-
end
|
18
|
-
end
|
1
|
+
require File.dirname(__FILE__) + '/test_helper'
|
2
|
+
|
3
|
+
require 'cerberus/publisher/irc'
|
4
|
+
require 'cerberus/config'
|
5
|
+
require 'mock/irc'
|
6
|
+
require 'mock/manager'
|
7
|
+
|
8
|
+
class IRCPublisherTest < Test::Unit::TestCase
|
9
|
+
def test_publisher
|
10
|
+
options = Cerberus::Config.new(nil, :publisher => {:irc => {:channel => 'hello'}}, :application_name => 'IrcApp')
|
11
|
+
build = DummyManager.new('last message', 'this is output', 1232, 'anatol')
|
12
|
+
|
13
|
+
Cerberus::Publisher::IRC.publish(build_status(true), build, options)
|
14
|
+
|
15
|
+
assert IRCConnection.connected
|
16
|
+
# assert_equal 1, IRCConnection.messages.size
|
17
|
+
end
|
18
|
+
end
|
@@ -1,21 +1,21 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
2
|
-
|
3
|
-
require 'cerberus/publisher/jabber'
|
4
|
-
require 'mock/xmpp4r'
|
5
|
-
require 'mock/manager'
|
6
|
-
|
7
|
-
class JabberPublisherTest < Test::Unit::TestCase
|
8
|
-
def test_publisher
|
9
|
-
options = Cerberus::Config.new(nil, :publisher => {:jabber => {:jid=>'from.cerberus@gmail.com', :recipients => ' jit1@google.com, another@google.com '}}, :application_name => 'MegaApp')
|
10
|
-
build = DummyManager.new('last message', 'this is output', 1232, 'anatol')
|
11
|
-
|
12
|
-
Cerberus::Publisher::Jabber.publish(build_status(false), build, options)
|
13
|
-
|
14
|
-
messages = Jabber::Client.messages
|
15
|
-
assert messages.size > 2
|
16
|
-
assert_equal 'google.com', messages[0].to.domain
|
17
|
-
assert_equal 'jit1', messages[0].to.node
|
18
|
-
assert_equal '[MegaApp] Build still broken (#1232)', messages[0].subject
|
19
|
-
assert !messages[0].body.nil?
|
20
|
-
end
|
21
|
-
end
|
1
|
+
require File.dirname(__FILE__) + '/test_helper'
|
2
|
+
|
3
|
+
require 'cerberus/publisher/jabber'
|
4
|
+
require 'mock/xmpp4r'
|
5
|
+
require 'mock/manager'
|
6
|
+
|
7
|
+
class JabberPublisherTest < Test::Unit::TestCase
|
8
|
+
def test_publisher
|
9
|
+
options = Cerberus::Config.new(nil, :publisher => {:jabber => {:jid=>'from.cerberus@gmail.com', :recipients => ' jit1@google.com, another@google.com '}}, :application_name => 'MegaApp')
|
10
|
+
build = DummyManager.new('last message', 'this is output', 1232, 'anatol')
|
11
|
+
|
12
|
+
Cerberus::Publisher::Jabber.publish(build_status(false), build, options)
|
13
|
+
|
14
|
+
messages = Jabber::Client.messages
|
15
|
+
assert messages.size > 2
|
16
|
+
assert_equal 'google.com', messages[0].to.domain
|
17
|
+
assert_equal 'jit1', messages[0].to.node
|
18
|
+
assert_equal '[MegaApp] Build still broken (#1232)', messages[0].subject
|
19
|
+
assert !messages[0].body.nil?
|
20
|
+
end
|
21
|
+
end
|
data/test/mail_publisher_test.rb
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
2
|
-
|
3
|
-
require 'cerberus/publisher/mail'
|
4
|
-
require 'mock/manager'
|
5
|
-
|
6
|
-
class MailPublisherTest < Test::Unit::TestCase
|
7
|
-
def setup
|
8
|
-
ActionMailer::Base.deliveries.clear
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_publisher
|
12
|
-
options = Cerberus::Config.new(nil, :publisher => {
|
13
|
-
:mail => {:recipients => 'anatol.pomozov@hello.com', :sender => 'haha', :delivery_method => 'test'}},
|
14
|
-
:application_name => 'MyApp')
|
15
|
-
build = DummyManager.new('last message', 'this is output', 1232, 'anatol')
|
16
|
-
|
17
|
-
Cerberus::Publisher::Mail.publish(build_status(true), build, options)
|
18
|
-
|
19
|
-
mails = ActionMailer::Base.deliveries
|
20
|
-
assert_equal 1, mails.size
|
21
|
-
mail = mails[0]
|
22
|
-
assert_equal 'haha', mail.from_addrs[0].address
|
23
|
-
assert_equal '[MyApp] Cerberus set up for project (#1232)', mail.subject
|
24
|
-
end
|
25
|
-
end
|
1
|
+
require File.dirname(__FILE__) + '/test_helper'
|
2
|
+
|
3
|
+
require 'cerberus/publisher/mail'
|
4
|
+
require 'mock/manager'
|
5
|
+
|
6
|
+
class MailPublisherTest < Test::Unit::TestCase
|
7
|
+
def setup
|
8
|
+
ActionMailer::Base.deliveries.clear
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_publisher
|
12
|
+
options = Cerberus::Config.new(nil, :publisher => {
|
13
|
+
:mail => {:recipients => 'anatol.pomozov@hello.com', :sender => 'haha', :delivery_method => 'test'}},
|
14
|
+
:application_name => 'MyApp')
|
15
|
+
build = DummyManager.new('last message', 'this is output', 1232, 'anatol')
|
16
|
+
|
17
|
+
Cerberus::Publisher::Mail.publish(build_status(true), build, options)
|
18
|
+
|
19
|
+
mails = ActionMailer::Base.deliveries
|
20
|
+
assert_equal 1, mails.size
|
21
|
+
mail = mails[0]
|
22
|
+
assert_equal 'haha', mail.from_addrs[0].address
|
23
|
+
assert_equal '[MyApp] Cerberus set up for project (#1232)', mail.subject
|
24
|
+
end
|
25
|
+
end
|
data/test/maven2_builer_test.rb
CHANGED
@@ -1,82 +1,82 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
2
|
-
|
3
|
-
require 'cerberus/builder/maven2'
|
4
|
-
require 'tmpdir'
|
5
|
-
|
6
|
-
class Cerberus::Builder::Maven2
|
7
|
-
attr_writer :output
|
8
|
-
end
|
9
|
-
|
10
|
-
class Maven2BuilderTest < Test::Unit::TestCase
|
11
|
-
def test_builder
|
12
|
-
tmp = Dir::tmpdir
|
13
|
-
builder = Cerberus::Builder::Maven2.new(:application_root => tmp)
|
14
|
-
builder.output = MVN_OUTPUT
|
15
|
-
assert !builder.successful?
|
16
|
-
|
17
|
-
reports_dir = tmp + '/target/surefire-reports/'
|
18
|
-
FileUtils.mkpath reports_dir
|
19
|
-
IO.write(reports_dir + 'wicket.util.resource.ResourceTest.txt', SUREFIRE1_OUTPUT)
|
20
|
-
IO.write(reports_dir + 'wicket.markup.html.form.persistence.CookieValuePersisterTest.txt', SUREFIRE2_OUTPUT)
|
21
|
-
|
22
|
-
builder.output = MVN_OUTPUT
|
23
|
-
builder.add_error_information
|
24
|
-
assert builder.output.include?('at wicket.markup.html.basic.SimplePageTest.testRenderHomePage_3(SimplePageTest.java:285)')
|
25
|
-
assert builder.output.include?('This is for wicket.util.resource.ResourceTest :=')
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
|
-
MVN_OUTPUT =<<-END
|
31
|
-
-------------------------------------------------------
|
32
|
-
T E S T S
|
33
|
-
-------------------------------------------------------
|
34
|
-
Running wicket.util.resource.ResourceTest
|
35
|
-
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.047 sec <<< FAILURE!
|
36
|
-
Running wicket.markup.html.list.PagedTableNavigatorWithMarginTest
|
37
|
-
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.313 sec
|
38
|
-
Running wicket.markup.html.list.IncrementalTableNavigationTest
|
39
|
-
=== wicket.markup.html.list.IncrementalTableNavigationPage ===
|
40
|
-
=== wicket.markup.html.list.IncrementalTableNavigationPage : nextNext ===
|
41
|
-
=== wicket.markup.html.list.IncrementalTableNavigationPage : prev ===
|
42
|
-
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 sec
|
43
|
-
Running wicket.markup.html.form.persistence.CookieValuePersisterTest
|
44
|
-
=== wicket.markup.html.list.IncrementalTableNavigationPage ===
|
45
|
-
=== wicket.markup.html.list.IncrementalTableNavigationPage : nextNext ===
|
46
|
-
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.516 sec <<< FAILURE!
|
47
|
-
Running wicket.util.string.StringListTest
|
48
|
-
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
|
49
|
-
|
50
|
-
Results :
|
51
|
-
Tests run: 449, Failures: 4, Errors: 9, Skipped: 0
|
52
|
-
|
53
|
-
[INFO] ------------------------------------------------------------------------
|
54
|
-
[ERROR] BUILD FAILURE
|
55
|
-
[INFO] ------------------------------------------------------------------------
|
56
|
-
[INFO] There are test failures.
|
57
|
-
END
|
58
|
-
|
59
|
-
SUREFIRE1_OUTPUT =<<-END
|
60
|
-
-------------------------------------------------------------------------------
|
61
|
-
Test set: wicket.markup.html.basic.SimplePageTest
|
62
|
-
-------------------------------------------------------------------------------
|
63
|
-
Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.521 sec <<< FAILURE!
|
64
|
-
testRenderHomePage_3(wicket.markup.html.basic.SimplePageTest) Time elapsed: 0.06 sec <<< FAILURE!
|
65
|
-
This is for wicket.util.resource.ResourceTest :=
|
66
|
-
|
67
|
-
END
|
68
|
-
|
69
|
-
SUREFIRE2_OUTPUT =<<-END
|
70
|
-
-------------------------------------------------------------------------------
|
71
|
-
Test set: wicket.markup.html.basic.SimplePageTest
|
72
|
-
-------------------------------------------------------------------------------
|
73
|
-
Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.521 sec <<< FAILURE!
|
74
|
-
testRenderHomePage_3(wicket.markup.html.basic.SimplePageTest) Time elapsed: 0.06 sec <<< FAILURE!
|
75
|
-
junit.framework.AssertionFailedError
|
76
|
-
at junit.framework.Assert.fail(Assert.java:47)
|
77
|
-
at junit.framework.Assert.assertTrue(Assert.java:20)
|
78
|
-
at junit.framework.Assert.assertTrue(Assert.java:27)
|
79
|
-
at wicket.WicketTestCase.executeTest(WicketTestCase.java:78)
|
80
|
-
at wicket.markup.html.basic.SimplePageTest.testRenderHomePage_3(SimplePageTest.java:285)
|
81
|
-
|
1
|
+
require File.dirname(__FILE__) + '/test_helper'
|
2
|
+
|
3
|
+
require 'cerberus/builder/maven2'
|
4
|
+
require 'tmpdir'
|
5
|
+
|
6
|
+
class Cerberus::Builder::Maven2
|
7
|
+
attr_writer :output
|
8
|
+
end
|
9
|
+
|
10
|
+
class Maven2BuilderTest < Test::Unit::TestCase
|
11
|
+
def test_builder
|
12
|
+
tmp = Dir::tmpdir
|
13
|
+
builder = Cerberus::Builder::Maven2.new(:application_root => tmp)
|
14
|
+
builder.output = MVN_OUTPUT
|
15
|
+
assert !builder.successful?
|
16
|
+
|
17
|
+
reports_dir = tmp + '/target/surefire-reports/'
|
18
|
+
FileUtils.mkpath reports_dir
|
19
|
+
IO.write(reports_dir + 'wicket.util.resource.ResourceTest.txt', SUREFIRE1_OUTPUT)
|
20
|
+
IO.write(reports_dir + 'wicket.markup.html.form.persistence.CookieValuePersisterTest.txt', SUREFIRE2_OUTPUT)
|
21
|
+
|
22
|
+
builder.output = MVN_OUTPUT
|
23
|
+
builder.add_error_information
|
24
|
+
assert builder.output.include?('at wicket.markup.html.basic.SimplePageTest.testRenderHomePage_3(SimplePageTest.java:285)')
|
25
|
+
assert builder.output.include?('This is for wicket.util.resource.ResourceTest :=')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
MVN_OUTPUT =<<-END
|
31
|
+
-------------------------------------------------------
|
32
|
+
T E S T S
|
33
|
+
-------------------------------------------------------
|
34
|
+
Running wicket.util.resource.ResourceTest
|
35
|
+
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.047 sec <<< FAILURE!
|
36
|
+
Running wicket.markup.html.list.PagedTableNavigatorWithMarginTest
|
37
|
+
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.313 sec
|
38
|
+
Running wicket.markup.html.list.IncrementalTableNavigationTest
|
39
|
+
=== wicket.markup.html.list.IncrementalTableNavigationPage ===
|
40
|
+
=== wicket.markup.html.list.IncrementalTableNavigationPage : nextNext ===
|
41
|
+
=== wicket.markup.html.list.IncrementalTableNavigationPage : prev ===
|
42
|
+
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 sec
|
43
|
+
Running wicket.markup.html.form.persistence.CookieValuePersisterTest
|
44
|
+
=== wicket.markup.html.list.IncrementalTableNavigationPage ===
|
45
|
+
=== wicket.markup.html.list.IncrementalTableNavigationPage : nextNext ===
|
46
|
+
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.516 sec <<< FAILURE!
|
47
|
+
Running wicket.util.string.StringListTest
|
48
|
+
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
|
49
|
+
|
50
|
+
Results :
|
51
|
+
Tests run: 449, Failures: 4, Errors: 9, Skipped: 0
|
52
|
+
|
53
|
+
[INFO] ------------------------------------------------------------------------
|
54
|
+
[ERROR] BUILD FAILURE
|
55
|
+
[INFO] ------------------------------------------------------------------------
|
56
|
+
[INFO] There are test failures.
|
57
|
+
END
|
58
|
+
|
59
|
+
SUREFIRE1_OUTPUT =<<-END
|
60
|
+
-------------------------------------------------------------------------------
|
61
|
+
Test set: wicket.markup.html.basic.SimplePageTest
|
62
|
+
-------------------------------------------------------------------------------
|
63
|
+
Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.521 sec <<< FAILURE!
|
64
|
+
testRenderHomePage_3(wicket.markup.html.basic.SimplePageTest) Time elapsed: 0.06 sec <<< FAILURE!
|
65
|
+
This is for wicket.util.resource.ResourceTest :=
|
66
|
+
|
67
|
+
END
|
68
|
+
|
69
|
+
SUREFIRE2_OUTPUT =<<-END
|
70
|
+
-------------------------------------------------------------------------------
|
71
|
+
Test set: wicket.markup.html.basic.SimplePageTest
|
72
|
+
-------------------------------------------------------------------------------
|
73
|
+
Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.521 sec <<< FAILURE!
|
74
|
+
testRenderHomePage_3(wicket.markup.html.basic.SimplePageTest) Time elapsed: 0.06 sec <<< FAILURE!
|
75
|
+
junit.framework.AssertionFailedError
|
76
|
+
at junit.framework.Assert.fail(Assert.java:47)
|
77
|
+
at junit.framework.Assert.assertTrue(Assert.java:20)
|
78
|
+
at junit.framework.Assert.assertTrue(Assert.java:27)
|
79
|
+
at wicket.WicketTestCase.executeTest(WicketTestCase.java:78)
|
80
|
+
at wicket.markup.html.basic.SimplePageTest.testRenderHomePage_3(SimplePageTest.java:285)
|
81
|
+
|
82
82
|
END
|