activerecord-cockroachdb-adapter
activerecord-cockroachdb-adapter copied to clipboard
[ActiveRecord 5.2 Test Failure] test/cases/migration/references_index_test.rb
Failure:
ActiveRecord::Migration::ReferencesIndexTest#test_creates_index_for_existing_table_even_if_index_option_is_not_passed [/Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:79]:
Expected false to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:73
Failure:
ActiveRecord::Migration::ReferencesIndexTest#test_creates_index_with_options [/Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:50]:
Expected false to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:44
Failure:
ActiveRecord::Migration::ReferencesIndexTest#test_creates_index_by_default_even_if_index_option_is_not_passed [/Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:33]:
Expected false to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:28
Failure:
ActiveRecord::Migration::ReferencesIndexTest#test_creates_polymorphic_index_for_existing_table [/Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:98]:
Expected false to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:92
Failure:
ActiveRecord::Migration::ReferencesIndexTest#test_creates_index [/Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:25]:
Expected false to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:20
Failure:
ActiveRecord::Migration::ReferencesIndexTest#test_creates_polymorphic_index [/Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:60]:
Expected false to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:55
Failure:
ActiveRecord::Migration::ReferencesIndexTest#test_creates_index_for_existing_table [/Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:70]:
Expected false to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration/references_index_test.rb:64
See the Contributing Guide for instructions on running tests.
If the test isn't valid against CockroachDB
- Add a ruby file to
test/excludesthat matches the name of the test class if one doesn't already exist. For example to exclude a test fromActiveRecord::AdapterTest, createtest/excludes/ActiveRecord/AdapterTest.rb. - Add an exclude statement to the file with the name of the test to exclude and a description. For example to exclude
test_indexesfromActiveRecord::AdapterTest: https://github.com/cockroachdb/activerecord-cockroachdb-adapter/blob/c3cb637bd855b36bbf9e76b7947162054b95022e/test/excludes/ActiveRecord/AdapterTest.rb#L1 - Finally, if the test can run against CockroachDB with a few changes, add it to
test/cases. Everything from the ActiveRecord test suite will be available, so a lot of the excluded test can be copied over. Namespace the test under theCockroachDBmodule to avoid name collisions. Seetest/cases/adapter_test.rbfor an example.
See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/48.