Project

General

Profile

Test failures on redmine 2.1 stable

Added by Clemens Teichmann over 11 years ago

I have just checked out redmine 2.1 stable:

svn co http://redmine.rubyforge.org/svn/branches/2.1-stable redmine-2.1

Prepared the db:

rake db:drop db:create db:migrate redmine:load_default_data RAILS_ENV=test

Run the tests:

rake test

Result was:

     
Activated Ruby 1.9.3. (from /home/clemenst/dev/onrooby/redmine-2.1/.ruby-version)
/home/clemenst/dev/onrooby/redmine-2.1/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
Darcs test repository NOT FOUND. Skipping unit tests !!!
  * DEFERRED: #link_to_if_authorized authorized user should be tested. 
  * DEFERRED: #link_to_if_authorized unauthorized user should be tested. 
(Test LDAP server not configured)
  * DEFERRED: #start_date should be tested when issues have no start date. 
  * DEFERRED: #due_date should be tested when issues have no due date. 
Skipping LDAP tests.
  * DEFERRED: User#notify_about? other events should be added and tested. 
Mercurial test repository NOT FOUND. Skipping unit tests !!!
Subversion test repository NOT FOUND. Skipping unit tests !!!
Git test repository NOT FOUND. Skipping unit tests !!!
CVS test repository NOT FOUND. Skipping unit tests !!!
Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS.
  * DEFERRED: #number_of_rows with one project should return the number of rows just for that project. 
  * DEFERRED: #number_of_rows with no project should return the total number of rows for all the projects, resursively. 
  * DEFERRED: #render_project should be tested. 
  * DEFERRED: #render_issues should be tested. 
  * DEFERRED: #render_version should be tested. 
  * DEFERRED: #subject_for_project should test the PNG format. 
  * DEFERRED: #subject_for_project should test the PDF format. 
  * DEFERRED: #line_for_project :html format late line should start from the starting point on the left. 
  * DEFERRED: #line_for_project :html format late line should be the total delayed width of the project. 
  * DEFERRED: #line_for_project :html format done line should start from the starting point on the left. 
  * DEFERRED: #line_for_project :html format done line should Be the total done width of the project. 
  * DEFERRED: #line_for_project :html format status content should show the percent complete. 
  * DEFERRED: #line_for_project should test the PNG format. 
  * DEFERRED: #line_for_project should test the PDF format. 
  * DEFERRED: #subject_for_version should test the PNG format. 
  * DEFERRED: #subject_for_version should test the PDF format. 
  * DEFERRED: #line_for_version should test the PNG format. 
  * DEFERRED: #line_for_version should test the PDF format. 
  * DEFERRED: #subject_for_issue should test the PNG format. 
  * DEFERRED: #subject_for_issue should test the PDF format. 
  * DEFERRED: #line_for_issue should test the PNG format. 
  * DEFERRED: #line_for_issue should test the PDF format. 
  * DEFERRED: #to_image should be tested. 
  * DEFERRED: #to_pdf should be tested. 
  * DEFERRED: MenuManager#current_menu_item should be tested. 
  * DEFERRED: MenuManager#render_main_menu should be tested. 
  * DEFERRED: MenuManager#render_menu should be tested. 
  * DEFERRED: MenuManager#menu_item_and_children should be tested. 
  * DEFERRED: MenuManager#extract_node_details should be tested. 
  * DEFERRED: Mapper#initialize should be tested. 
  * DEFERRED: MenuItem#caption should be tested. 
  * DEFERRED: MenuItem#html_options should be tested. 
  * DEFERRED: MenuManager#map should be tested. 
  * DEFERRED: MenuManager#items should be tested. 
Subversion test repository NOT FOUND. Skipping unit tests !!!
Darcs test repository NOT FOUND. Skipping unit tests !!!
Cvs test repository NOT FOUND. Skipping unit tests !!!
Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS.
Bazaar test repository NOT FOUND. Skipping unit tests !!!
Mercurial test repository NOT FOUND. Skipping unit tests !!!
Git test repository NOT FOUND. Skipping unit tests !!!
Bazaar test repository NOT FOUND. Skipping unit tests !!!
Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP   

Loaded suite /home/clemenst/dev/onrooby/redmine-2.1/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
...............................................................................
...............................................................................
...................................E
===============================================================================
Error: test_journals_after_should_return_journals_with_greater_id(IssueTest)
  ActiveRecord::RecordNotFound: Couldn't find Journal with id=2
test/unit/issue_test.rb:1570:in `test_journals_after_should_return_journals_with_greater_id'
     1567:   end
     1568: 
     1569:   def test_journals_after_should_return_journals_with_greater_id
  => 1570:     assert_equal [Journal.find(2)], Issue.find(1).journals_after('1')
     1571:     assert_equal [], Issue.find(1).journals_after('2')
     1572:   end
     1573: 
===============================================================================
E
===============================================================================
Error: test_journals_after_with_blank_arg_should_return_all_journals(IssueTest)
  ActiveRecord::RecordNotFound: Couldn't find Journal with id=1
test/unit/issue_test.rb:1575:in `test_journals_after_with_blank_arg_should_return_all_journals'
     1572:   end
     1573: 
     1574:   def test_journals_after_with_blank_arg_should_return_all_journals
  => 1575:     assert_equal [Journal.find(1), Journal.find(2)], Issue.find(1).journals_after('')
     1576:   end
     1577: end
===============================================================================
F
===============================================================================
Failure:
  <2> expected but was
  <nil>.
test_last_journal_id_with_journals_should_return_the_journal_id(IssueTest)
test/unit/issue_test.rb:1562:in `test_last_journal_id_with_journals_should_return_the_journal_id'
     1559:   end
     1560: 
     1561:   def test_last_journal_id_with_journals_should_return_the_journal_id
  => 1562:     assert_equal 2, Issue.find(1).last_journal_id
     1563:   end
     1564: 
     1565:   def test_last_journal_id_without_journals_should_return_nil
===============================================================================
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
........................................F
===============================================================================
Failure:
  "Applied in changeset ecookbook:r12345." not found in "Brukt i endringssett ecookbook:r12345.".
  <false> is not true.
test_commit_closing_a_subproject_issue(ChangesetTest)
test/test_helper.rb:164:in `assert_include'
test/unit/changeset_test.rb:195:in `block in test_commit_closing_a_subproject_issue'
test/test_helper.rb:112:in `with_settings'
test/unit/changeset_test.rb:182:in `test_commit_closing_a_subproject_issue'
     179:   end
     180: 
     181:   def test_commit_closing_a_subproject_issue
  => 182:     with_settings :commit_fix_status_id => 5, :commit_fix_keywords => 'closes' do
     183:       issue = Issue.find(5)
     184:       assert !issue.closed?
     185:       assert_difference 'Journal.count' do
===============================================================================
...............................................................................
...............................................................................
.................................F
===============================================================================
Failure:
  "Parent forum is invalid" not found in "["Parent forum er ugyldig"]".
  <false> is not true.
test_parent_should_be_in_same_project(BoardTest)
test/test_helper.rb:164:in `assert_include'
test/unit/board_test.rb:46:in `test_parent_should_be_in_same_project'
     43:   def test_parent_should_be_in_same_project
     44:     board = Board.new(:project_id => 3, :name => 'Test', :description => 'Test', :parent_id => 1)
     45:     assert !board.save
  => 46:     assert_include "Parent forum is invalid", board.errors.full_messages
     47:   end
     48: 
     49:   def test_valid_parents_should_not_include_self_nor_a_descendant
===============================================================================
......................

Finished in 224.420793912 seconds.

1399 tests, 10725 assertions, 3 failures, 2 errors, 0 pendings, 0 omissions, 0 notifications
0% passed

6.23 tests/s, 47.79 assertions/s
/home/clemenst/dev/onrooby/redmine-2.1/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
CVS test repository NOT FOUND. Skipping functional tests !!!
  * DEFERRED: IssueRelationsController should prevent relation creation when there's a circular dependency. 
Git test repository NOT FOUND. Skipping functional tests !!!
Darcs test repository NOT FOUND. Skipping functional tests !!!
Filesystem test repository NOT FOUND. Skipping functional tests !!!
Bazaar test repository NOT FOUND. Skipping functional tests !!!
Subversion test repository NOT FOUND. Skipping functional tests !!!
Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP   

Mercurial test repository NOT FOUND. Skipping functional tests !!!
Loaded suite /home/clemenst/dev/onrooby/redmine-2.1/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
.................................................sh: 1: darcs: not found
sh: 1: hg: not found
sh: 1: cvs: not found
sh: 1: bzr: not found
..............................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
....

Finished in 137.407453868 seconds.

1031 tests, 4191 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
0% passed

7.50 tests/s, 30.50 assertions/s
/home/clemenst/dev/onrooby/redmine-2.1/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
Loaded suite /home/clemenst/dev/onrooby/redmine-2.1/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
...............................................................................
................................^[[A...............................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
................................................

Finished in 97.489316336 seconds.

996 tests, 2943 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
0% passed

10.22 tests/s, 30.19 assertions/s
Errors running test:units! #<RuntimeError: Command failed with status (1): [/home/clemenst/.rbfu/rubies/1.9.3-p125/bin...]>

I am not sure about these failures/errors. I just want to create a new plugin and wanted to make sure that all tests are holding with and without the plugin. Am i missing something?

Thanks in advance


Replies (3)

RE: Test failures on redmine 2.1 stable - Added by Etienne Massip over 11 years ago

You shouldn't redmine:load_default_data.

Journal related errors are due to missing fixtures and have been fixed yesterday on trunk with r10433.

RE: Test failures on redmine 2.1 stable - Added by Clemens Teichmann over 11 years ago

ok thanks... Now the the issue test is passing, which i was mainly worried about.

FYI:

I prepared the db again, without load_default_data. But still getting some failures:

===============================================================================
Failure:
  "Applied in changeset ecookbook:r12345." not found in "Brukt i endringssett ecookbook:r12345.".
  <false> is not true.
test_commit_closing_a_subproject_issue(ChangesetTest)
test/test_helper.rb:164:in `assert_include'
test/unit/changeset_test.rb:195:in `block in test_commit_closing_a_subproject_issue'
test/test_helper.rb:112:in `with_settings'
test/unit/changeset_test.rb:182:in `test_commit_closing_a_subproject_issue'
     179:   end
     180: 
     181:   def test_commit_closing_a_subproject_issue
  => 182:     with_settings :commit_fix_status_id => 5, :commit_fix_keywords => 'closes' do
     183:       issue = Issue.find(5)
     184:       assert !issue.closed?
     185:       assert_difference 'Journal.count' do
===============================================================================
...............................................................................
...............................................................................
.................................F
===============================================================================
Failure:
  "Parent forum is invalid" not found in "["Parent forum er ugyldig"]".
  <false> is not true.
test_parent_should_be_in_same_project(BoardTest)
test/test_helper.rb:164:in `assert_include'
test/unit/board_test.rb:46:in `test_parent_should_be_in_same_project'
     43:   def test_parent_should_be_in_same_project
     44:     board = Board.new(:project_id => 3, :name => 'Test', :description => 'Test', :parent_id => 1)
     45:     assert !board.save
  => 46:     assert_include "Parent forum is invalid", board.errors.full_messages
     47:   end
     48: 
     49:   def test_valid_parents_should_not_include_self_nor_a_descendant
===============================================================================
......................

Finished in 219.892897469 seconds.

1399 tests, 10728 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
0% passed

6.36 tests/s, 48.79 assertions/s
rake aborted!
Command failed with status (1): [/home/clemenst/.rbfu/rubies/1.9.3-p125/bin...]

Tasks: TOP => test:units
(See full trace by running task with --trace)

RE: Test failures on redmine 2.1 stable - Added by Etienne Massip over 11 years ago

This looks like an issue, langage should be set to :en in tests and it is not for these ones.

    (1-3/3)