Forum: Ruby on Rails activerecord rake test_mysql

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5f699f59b58693ce313995caf4330486?d=identicon&s=25 benanderson.us (Guest)
on 2005-11-27 14:49
(Received via mailing list)
Hi
I posted this on rails-core (hoping that was more development
oriented), but got no responses, so I figured I'd try here.

I'd like to submit a patch and am following the steps on this page:
http://dev.rubyonrails.org/

Here's what I did (using mysql 5.0.15-nt):

created 2 databases:
 activerecord_unittest
 activerecord_unittest2

created 1 user:  rails (giving all priveleges to both databases)

ran $RAILS_HOME/activerecord\test\fixtures\db_definitions\mysql.sql on
activerecord_unittest
ran $RAILS_HOME/activerecord\test\fixtures\db_definitions\mysql2.sql
on activerecord_unittest2

modified
$RAILS_HOME/activerecord\test\connections\native_mysql/connect.rb
accordingly

I removed all my local changes, so I'm running with a pristine copy of
the current trunk.
cd $RAILS_HOME/activerecord
rake test_mysql

below I posted the output I received.  Is this correct or should all
tests pass?  I am assuming I've got something screwed up?  Anyone have
any idea?
Thanks,
Ben


(in
C:/ruby/projects/rails/projects/myWardrobe/vendor/rails/activerecord)
Using native MySQL
Loaded suite
c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader
Started
........EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...............................................................................................F.............F.......EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE....EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.......................E...E..........E............F............EEE..............EEEEEEE....................FF....F.....................................................................................
Finished in 77.0 seconds.

 1) Error:
test_adding_macro_callbacks(AssociationCallbacksTest):
ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field 'type'
doesn't have a default value: INSERT INTO projects (`name`, `id`)
VALUES ('Active Record', 1)
   ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:78:in
`log'
   ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:in
`execute'
   ./test/../lib/active_record/fixtures.rb:284:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:283:in `each'
   ./test/../lib/active_record/fixtures.rb:283:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `each'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:251:in `transaction'
   ./test/../lib/active_record/fixtures.rb:251:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:244:in `silence'
   ./test/../lib/active_record/fixtures.rb:244:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:539:in `load_fixtures'
   ./test/../lib/active_record/fixtures.rb:487:in `setup_with_fixtures'
   ./test/../lib/active_record/fixtures.rb:521:in `setup'
   ./test/../lib/active_record/fixtures.rb:520:in `setup'

 2) Error:
test_adding_with_proc_callbacks(AssociationCallbacksTest):
ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field 'type'
doesn't have a default value: INSERT INTO projects (`name`, `id`)
VALUES ('Active Record', 1)
   ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:78:in
`log'
   ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:in
`execute'
   ./test/../lib/active_record/fixtures.rb:284:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:283:in `each'
   ./test/../lib/active_record/fixtures.rb:283:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `each'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:251:in `transaction'
   ./test/../lib/active_record/fixtures.rb:251:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:244:in `silence'
   ./test/../lib/active_record/fixtures.rb:244:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:539:in `load_fixtures'
   ./test/../lib/active_record/fixtures.rb:487:in `setup_with_fixtures'
   ./test/../lib/active_record/fixtures.rb:521:in `setup'
   ./test/../lib/active_record/fixtures.rb:520:in `setup'

 3) Error:
test_dont_add_if_before_callback_raises_exception(AssociationCallbacksTest):
ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field 'type'
doesn't have a default value: INSERT INTO projects (`name`, `id`)
VALUES ('Active Record', 1)
   ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:78:in
`log'
   ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:in
`execute'
   ./test/../lib/active_record/fixtures.rb:284:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:283:in `each'
   ./test/../lib/active_record/fixtures.rb:283:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `each'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:251:in `transaction'
   ./test/../lib/active_record/fixtures.rb:251:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:244:in `silence'
   ./test/../lib/active_record/fixtures.rb:244:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:539:in `load_fixtures'
   ./test/../lib/active_record/fixtures.rb:487:in `setup_with_fixtures'
   ./test/../lib/active_record/fixtures.rb:521:in `setup'
   ./test/../lib/active_record/fixtures.rb:520:in `setup'

 4) Error:
test_has_and_belongs_to_many_add_callback(AssociationCallbacksTest):
ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field 'type'
doesn't have a default value: INSERT INTO projects (`name`, `id`)
VALUES ('Active Record', 1)
   ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:78:in
`log'
   ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:in
`execute'
   ./test/../lib/active_record/fixtures.rb:284:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:283:in `each'
   ./test/../lib/active_record/fixtures.rb:283:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `each'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:251:in `transaction'
   ./test/../lib/active_record/fixtures.rb:251:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:244:in `silence'
   ./test/../lib/active_record/fixtures.rb:244:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:539:in `load_fixtures'
   ./test/../lib/active_record/fixtures.rb:487:in `setup_with_fixtures'
   ./test/../lib/active_record/fixtures.rb:521:in `setup'
   ./test/../lib/active_record/fixtures.rb:520:in `setup'

...
bunch of smiliar stuff in the middle
...


326) Error:
test_readonly_scoping(ReadOnlyTest):
ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field 'type'
doesn't have a default value: INSERT INTO projects (`name`, `id`)
VALUES ('Active Record', 1)
   ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:78:in
`log'
   ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:in
`execute'
   ./test/../lib/active_record/fixtures.rb:284:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:283:in `each'
   ./test/../lib/active_record/fixtures.rb:283:in `insert_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:253:in `each'
   ./test/../lib/active_record/fixtures.rb:253:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:251:in `transaction'
   ./test/../lib/active_record/fixtures.rb:251:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:244:in `silence'
   ./test/../lib/active_record/fixtures.rb:244:in `create_fixtures'
   ./test/../lib/active_record/fixtures.rb:539:in `load_fixtures'
   ./test/../lib/active_record/fixtures.rb:487:in `setup'

327) Failure:
test_callback_rollback_in_save(TransactionTest)
[./test/transactions_test.rb:119]:
<false> is not true.

328) Failure:
test_failing_on_exception(TransactionTest)
[./test/transactions_test.rb:87]:
First shouldn't have been approved.
<false> is not true.

329) Failure:
test_successful_with_return(TransactionTest)
[./test/transactions_test.rb:49]:
<false> is not true.

659 tests, 1142 assertions, 6 failures, 323 errors
rake aborted!
Command failed with status (1): [c:/ruby/ruby-1.8.2-15/ruby/bin/ruby
-Ilib;...]
This topic is locked and can not be replied to.