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

Improve tag mapping tests #16453

Merged
merged 2 commits into from
Nov 13, 2017
Merged

Conversation

cben
Copy link
Contributor

@cben cben commented Nov 13, 2017

https://bugzilla.redhat.com/show_bug.cgi?id=1508437 (master)
https://bugzilla.redhat.com/show_bug.cgi?id=1510095 (gaprindashvili)
https://bugzilla.redhat.com/show_bug.cgi?id=1510096 (fine)

@Ladas @agrare Please review this first, unblocks other PRs to not have circular deps...

cben added 2 commits November 13, 2017 13:52
There are tests in many places approximating this,
not all correctly...
Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ this is awesome @cben

@agrare agrare merged commit 66a5465 into ManageIQ:master Nov 13, 2017
@agrare
Copy link
Member

agrare commented Nov 13, 2017

@cben are any of these dependent PRs going to be backported to gaprindashvili?

@agrare agrare added this to the Sprint 73 Ending Nov 13, 2017 milestone Nov 13, 2017
@cben
Copy link
Contributor Author

cben commented Nov 13, 2017 via email

@cben
Copy link
Contributor Author

cben commented Nov 14, 2017

@miq-bot add-label fine/yes
(this added tests for a fine/backported, gaprindashvili/kackported bugfix. BZ in PR descrpition.
followup PRs about graph refresh will be fine/no of course.)

simaishi pushed a commit that referenced this pull request Nov 14, 2017
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit feb7ff3e5c3b043eb22569e3f9157ce65bdca5fd
Author: Adam Grare <[email protected]>
Date:   Mon Nov 13 08:32:08 2017 -0500

    Merge pull request #16453 from cben/mapping_with_category_factory
    
    Improve tag mapping tests
    (cherry picked from commit 66a5465d7360474aaae1315fd9f66e93484b34f4)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1510095

cben added a commit to cben/manageiq that referenced this pull request Nov 20, 2017
In ManageIQ#16453, I changed this spec to "realistically"
create a tag mapping + category + tag.
But I made a typo/thinko, taking the parent
(category) tag to be assigned to the vm.
This caused false failure for ManageIQ#16449 and days of
lost work debugging/rewriting it, eventually caused
similar failure in the rewrite too :-(

https://bugzilla.redhat.com/show_bug.cgi?id=1508437
@simaishi
Copy link
Contributor

@cben there is a conflict backporting to Fine branch in spec/models/ems_refresh/save_inventory/save_tags_inventory_spec.rb. Please create a separate PR.

++<<<<<<< HEAD
 +    @tag1 = FactoryGirl.create(:tag, :name => '/managed/amazon:vm:owner')
 +    @tag2 = FactoryGirl.create(:tag, :name => '/managed/kubernetes:container_node:stuff')
 +    @tag3 = FactoryGirl.create(:tag, :name => '/managed/kubernetes:foo') # All
 +
 +    @cat1 = FactoryGirl.create(:category, :description => 'amazon_vm_owner', :tag => @tag1)
 +    @cat2 = FactoryGirl.create(:category, :description => 'department', :tag => @tag2)
 +    @cat3 = FactoryGirl.create(:category, :description => 'location', :tag => @tag3)
++=======
+     @tag1 = mapped_tag('amazon:vm:owner', 'alice')
+     @tag2 = mapped_tag('kubernetes:container_node:stuff', 'jabberwocky')
+     @tag3 = mapped_tag('kubernetes::foo', 'bar') # All entities
++>>>>>>> 66a5465... Merge pull request #16453 from cben/mapping_with_category_factory

@cben
Copy link
Contributor Author

cben commented Nov 21, 2017

@simaishi done => #16511

@simaishi
Copy link
Contributor

Backported to Fine via #16511

@simaishi simaishi removed the fine/yes label Nov 28, 2017
cben pushed a commit to cben/manageiq that referenced this pull request Apr 14, 2018
cben pushed a commit to cben/manageiq that referenced this pull request Apr 14, 2018
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.

5 participants