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

Remove pending tests for model VmdbTable #8905

Merged
merged 1 commit into from
May 23, 2016

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented May 23, 2016

These tests were marked pending in 2012.

Since VmdbTable is an actual table, they don't make much sense anymore.

commit 0740a8068f3daff699c3d7e91731fa181643445c
Author: Jason Frey <[email protected]>
Date:   Mon Apr 16 15:06:42 2012 +0000

    Temporarily marked VmdbTable based tests as pending until the new model-based rewrite is complete.
    BugzID:14572

/cc @Fryguy

@kbrock kbrock added the test label May 23, 2016
@kbrock kbrock force-pushed the pending_vmdb_table branch from fd42ecf to b67549f Compare May 23, 2016 19:52
@Fryguy Fryguy merged commit e3d2e8a into ManageIQ:master May 23, 2016
@Fryguy Fryguy added this to the Sprint 41 Ending May 30, 2016 milestone May 23, 2016
@kbrock kbrock deleted the pending_vmdb_table branch May 24, 2016 02:11
jrafanie added a commit to jrafanie/manageiq that referenced this pull request May 5, 2021
These were added/edited in ManageIQ#21108 and ManageIQ#21076

All other MiqProductFeature has the feature_type field:
irb(main):004:0> MiqProductFeature.where(:feature_type => nil).count
   (0.7ms)  SELECT COUNT(*) FROM "miq_product_features" WHERE "miq_product_features"."feature_type" IS NULL
=> 2

Because this was missing, the sort_by in MiqProductFeature.sort_children was
failing with the error below when you try to login as a non-admin user:

```
[----] F, [2021-05-05T12:03:59.696562 ManageIQ#8905:3fcc63630bcc] FATAL -- : Error caught: [ActionView::Template::Error] comparison of Array with Array failed
/Users/joerafaniello/Code/manageiq/app/models/miq_product_feature.rb:145:in `sort_by'
/Users/joerafaniello/Code/manageiq/app/models/miq_product_feature.rb:145:in `sort_children'
/Users/joerafaniello/Code/manageiq/app/models/miq_product_feature.rb:76:in `feature_children'
/Users/joerafaniello/Code/manageiq/app/models/miq_user_role.rb:55:in `block in allows_any?'
/Users/joerafaniello/Code/manageiq/app/models/miq_user_role.rb:55:in `map'
/Users/joerafaniello/Code/manageiq/app/models/miq_user_role.rb:55:in `allows_any?'
/Users/joerafaniello/Code/manageiq/app/models/miq_user_role.rb:57:in `allows_any?'
/Users/joerafaniello/Code/manageiq/lib/rbac/authorizer.rb:62:in `user_role_allows_any?'
/Users/joerafaniello/Code/manageiq/lib/rbac/authorizer.rb:28:in `role_allows?'
/Users/joerafaniello/Code/manageiq/lib/rbac/authorizer.rb:6:in `role_allows?'
/Users/joerafaniello/Code/manageiq/lib/rbac.rb:29:in `role_allows?'
/Users/joerafaniello/Code/manageiq/app/models/user.rb:212:in `role_allows_any?'
/Users/joerafaniello/Code/manageiq-ui-classic/app/presenters/menu/section.rb:38:in `visible?'
```

Admin users bypass some of the feature checks so was able to login without
issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants