Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #14752 - only add index once in features migration #175

Closed
wants to merge 1 commit into from

Conversation

stbenjam
Copy link
Member

@stbenjam stbenjam commented Apr 22, 2016

Not intending this one to get merged, just opened for running tests. Really should be part of #173 Nevermind, we can use this PR to get tests going again.

@stbenjam
Copy link
Member Author

stbenjam commented Apr 22, 2016

Index was getting added twice on label in Rails 4.2, which resulted in:

Index name 'index_remote_execution_features_on_label' on table 'remote_execution_features' already exists/usr/local/rvm/gems/ruby-2.0.0-p353@test_plugin_pull_request-2/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:954:in `add_index_options'

@ares
Copy link
Member

ares commented Apr 22, 2016

APJ

@domcleal
Copy link

Please note that the tests may appear to be passing, but a failure loading your tests is being ignored - probably due to the way the task is enhanced. (If you fix this somehow, please fix it also in the plugin template.)

/var/lib/workspace/workspace/test_plugin_pull_request/database/postgresql/label/fast/ruby/1.9.3/plugin/test/test_plugin_helper.rb:11:in `': uninitialized constant DatabaseCleaner (NameError)
    from /var/lib/workspace/workspace/test_plugin_pull_request/database/postgresql/label/fast/ruby/1.9.3/plugin/test/functional/api/v2/foreign_input_sets_controller_test.rb:1:in `require'
    from /var/lib/workspace/workspace/test_plugin_pull_request/database/postgresql/label/fast/ruby/1.9.3/plugin/test/functional/api/v2/foreign_input_sets_controller_test.rb:1:in `'
    from /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin_pull_request-0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:10:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin_pull_request-0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in '
    from /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin_pull_request-0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:9:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin_pull_request-0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:9:in `block in '
    from /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin_pull_request-0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:4:in `select'
    from /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin_pull_request-0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb:4:in `'
-- execute("SET CONSTRAINTS ALL DEFERRED;")
   -> 0.0021s
rake aborted!

@stbenjam
Copy link
Member Author

@domcleal Well we can require database_cleaner directly, and that should fix this problem.

Not sure how to fix jenkins ignoring the failure though... rake test:foreman_remote_execution returns 1, does it not when its just enhancing the test task?

@stbenjam
Copy link
Member Author

Hmph, I wonder how long tests really haven't been running.

/usr/local/rvm/gems/ruby-2.0.0-p353@test_plugin_pull_request-0/gems/activemodel-4.2.6/lib/active_model/validations.rb:157:in `block in validate': Unknown key: :presence. Valid keys are: :on, :if, :unless, :prepend. Perhaps you meant to call `validates` instead of `validate`? (ArgumentError)

@stbenjam
Copy link
Member Author

Oh, all kinds of test failures now that they're actually running 😢

@domcleal
Copy link

Not sure how to fix jenkins ignoring the failure though... rake test:foreman_remote_execution returns 1, does it not when its just enhancing the test task?

The change at theforeman/foreman_plugin_template#14 should do it.

@stbenjam
Copy link
Member Author

@domcleal Awesome, thanks!

Closing this one, as we moved it all over to #173.

@stbenjam stbenjam closed this Apr 26, 2016
@stbenjam stbenjam deleted the fix-tests branch April 26, 2016 13:33
MariaAga pushed a commit to MariaAga/foreman_remote_execution that referenced this pull request Sep 3, 2021
Fixes #13787 - Do not reopen task details on autorefresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants