我可以通过终端命令运行minitest,但是当我通过jenkins运行同一命令时,它会在我所有的测试用例上抛出“ ArgumentError:无效日期”。我找不到Google提供的任何解决方案。有人可以帮助我吗?在这里问这些问题的合适地方吗?
ruby ../udesk_devops/autotest.rb 'develop' 'daily'
这可以通过命令行正确运行。 但是会通过詹金斯通过“无效日期”
在执行jenkins的过程中,我可以在日志中看到回滚。 看来数据正在尝试从固定装置进入mysql。
Error:
test_问题库分类列表(管理员的问题库)(OpenApiV1::KnowledgeCatalogsControllerTest):
ArgumentError: invalid date
/usr/share/rvm/gems/ruby-2.3.3/gems/timecop-0.8.1/lib/timecop/time_extensions.rb:108:in `parse'
/usr/share/rvm/gems/ruby-2.3.3/gems/timecop-0.8.1/lib/timecop/time_extensions.rb:108:in `parse_with_mock_date'
/usr/share/rvm/gems/ruby-2.3.3/gems/activesupport-4.0.13/lib/active_support/core_ext/string/conversions.rb:53:in `to_datetime'
/usr/share/rvm/gems/ruby-2.3.3/gems/activesupport-4.0.13/lib/active_support/core_ext/date_time/calculations.rb:164:in `<=>'
/usr/share/rvm/gems/ruby-2.3.3/gems/activesupport-4.0.13/lib/active_support/core_ext/time/calculations.rb:286:in `compare_with_coercion'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:570:in `=='
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:570:in `block (2 levels) in table_rows'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:569:in `each'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:569:in `block in table_rows'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:557:in `each'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:557:in `map'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:557:in `table_rows'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:473:in `block (3 levels) in create_fixtures'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:471:in `each'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:471:in `block (2 levels) in create_fixtures'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/connection_adapters/abstract/database_statements.rb:203:in `block in transaction'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `within_new_transaction'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/connection_adapters/abstract/database_statements.rb:203:in `transaction'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:470:in `block in create_fixtures'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:274:in `disable_referential_integrity'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:457:in `create_fixtures'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:899:in `load_fixtures'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:859:in `setup_fixtures'
/usr/share/rvm/gems/ruby-2.3.3/gems/activerecord-4.0.13/lib/active_record/fixtures.rb:712:in `before_setup'
/var/lib/jenkins/workspace/udesk_proj_week_daily/test/test_helper.rb:35:in `before_setup'