Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Raise UnlicensedFeatureError when we receive a HTTP 402 #65

Merged
merged 1 commit into from
Jan 31, 2017

Conversation

bdunne
Copy link
Contributor

@bdunne bdunne commented Jan 31, 2017

Rescue UnlicensedFeatureError when trying to fetch survey_data
https://bugzilla.redhat.com/show_bug.cgi?id=1370251

@bdunne
Copy link
Contributor Author

bdunne commented Jan 31, 2017

@syncrou Please review

@syncrou
Copy link
Contributor

syncrou commented Jan 31, 2017

@bdunne - Is this going to be the fix for /activity_stream as well - Or are you thinking to go another route in that case?

@bdunne bdunne force-pushed the unlicensed_features branch from 49f0be2 to d4f8161 Compare January 31, 2017 14:54
@@ -25,6 +25,13 @@
expect(described_class.new(api, raw_instance_no_survey).survey_spec).to be_nil
end
end

describe "unlicensed" do
Copy link
Contributor

Choose a reason for hiding this comment

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

@bdunne - This looks great. It would be great to have some testing around the middleware as well.

@bdunne
Copy link
Contributor Author

bdunne commented Jan 31, 2017

@syncrou Yes, it would raise AnsibleTowerClient::UnlicensedFeatureError on /activity_stream as well.
cc @durandom @blomquisg

@bdunne bdunne force-pushed the unlicensed_features branch from d4f8161 to 586af43 Compare January 31, 2017 15:04
@miq-bot
Copy link
Collaborator

miq-bot commented Jan 31, 2017

Checked commit bdunne@586af43 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
5 files checked, 1 offense detected

lib/ansible_tower_client/base_models/job_template.rb

@bdunne
Copy link
Contributor Author

bdunne commented Jan 31, 2017

@syncrou Middleware test added

Copy link
Contributor

@syncrou syncrou left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@bdunne bdunne merged commit 4b4b60c into ansible:master Jan 31, 2017
@bdunne bdunne deleted the unlicensed_features branch January 31, 2017 16:14
bdunne added a commit that referenced this pull request Feb 2, 2017
Added
- Refactor `#endpoint` [(#64)](#64)
- Expose playbooks off of projects [(#62)](#62)

Changed
- Allow for alternative resource paths [(#66)](#66)
- Raise UnlicensedFeatureError when we receive HTTP 402 [(#65)](#65)

Fixed
- Adjusted project_spec to test on a Project [(#63)](#63)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants