Skip to content

Commit

Permalink
Merge pull request #138 from 3scale/remote_add
Browse files Browse the repository at this point in the history
Remote add change validation method
  • Loading branch information
eguzki authored May 13, 2019
2 parents 527d94c + d8eb31c commit 087b7f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/3scale_toolbox/commands/remote_command/remote_add.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def validate_remote(remote_url_str)
# parsing url before trying to create client
# raises Invalid URL when syntax is incorrect
ThreeScaleToolbox::Helper.parse_uri(remote_url_str)
threescale_client(remote_url_str).list_services
threescale_client(remote_url_str).list_accounts
rescue ThreeScale::API::HttpClient::ForbiddenError
raise ThreeScaleToolbox::Error, 'remote not valid'
end
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/remote_add_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
FileUtils.cp(File.join(resources_path, 'valid_config_file.yaml'),
tmp_dir)
stub_request(:get, /example.com/).to_return(status: 200,
body: '{"services": []}')
body: '{"accounts": []}')
end
let(:configuration) { ThreeScaleToolbox::Configuration.new(config_file) }

Expand Down

0 comments on commit 087b7f2

Please sign in to comment.