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

Delete portfolio items #82

Closed
wants to merge 2 commits into from

Conversation

syncrou
Copy link
Contributor

@syncrou syncrou commented Jan 4, 2019

Create a new route for deleting Portfolio Items
Add spec coverage for portfolio items

@syncrou syncrou changed the title Delete portfolio items [WIP] Delete portfolio items Jan 4, 2019
@syncrou syncrou added the enhancement New feature or request label Jan 4, 2019
@syncrou
Copy link
Contributor Author

syncrou commented Jan 4, 2019

@lgalis please take a look

@syncrou syncrou added the wip label Jan 4, 2019
@syncrou syncrou force-pushed the delete_portfolio_items branch 2 times, most recently from a454542 to 6ac9ce7 Compare January 7, 2019 04:23
@syncrou syncrou requested a review from mkanoor January 7, 2019 04:23
@syncrou syncrou removed the wip label Jan 7, 2019
@syncrou syncrou changed the title [WIP] Delete portfolio items Delete portfolio items Jan 7, 2019
@syncrou
Copy link
Contributor Author

syncrou commented Jan 7, 2019

@gmcculloug @mkanoor Please review
cc @lgalis

@syncrou syncrou force-pushed the delete_portfolio_items branch from 6ac9ce7 to 1f03055 Compare January 7, 2019 04:27

before do
allow(ServiceCatalog::ServicePlans).to receive(:new).with(portfolio_item.id.to_s).and_return(svc_object)
# Encoded Header: { 'identity' => { 'is_org_admin':false, 'org_id':111 } }
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -0,0 +1,51 @@
module ServiceCatalog
Copy link
Contributor

Choose a reason for hiding this comment

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

@syncrou
What is this file, is it a spec or a support file. We already have a spec file in
https://github.com/ManageIQ/service_portal-api/blob/master/spec/services/service_catalog/service_offering_spec.rb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Support file

Same as my comment above.

Any spec calling create on PortfolioItem was causing me lots of pain. This allows those requests to work with real data see line 17 here: https://github.com/ManageIQ/service_portal-api/pull/82/files#diff-da5419dcb98a21e5282dcb098c832fea

@@ -0,0 +1,24 @@
class TopologicalInventory
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it isn't, it's a support file that allows us to call the TopologicalInventory class with out making a request to real Topological inventory. This file helped removing Mocking that was happening for any ServiceOffering instance. I'm going to pull this class out of the PR and move all these spec changes into their own PR to help clarify what I was doing here.

@syncrou
Copy link
Contributor Author

syncrou commented Jan 7, 2019

Closed in favor of #84

@syncrou syncrou closed this Jan 7, 2019
@syncrou syncrou deleted the delete_portfolio_items branch January 7, 2019 16:42
gmcculloug added a commit to gmcculloug/catalog-api that referenced this pull request Nov 8, 2019
Added selection of destination project for order modal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants