Giter Club home page Giter Club logo

Comments (8)

ehaselwanter avatar ehaselwanter commented on August 17, 2024

so for now I'm monkey patching it for exactly this case (ignoring non proxy envs) with the following in my kitchen.yml:

<%
require 'oci/api_client'

module OCI
  class ApiClient
  def get_http_object(hostname, port)

       proxy=URI.parse(ENV['http_proxy'])

      Net::HTTP.new(
        hostname,
        port,
        proxy.host,
        proxy.port,
        proxy.user,
        proxy.password
      )
    end
  end
end

%>

from kitchen-oci.

stephenpearson avatar stephenpearson commented on August 17, 2024

@ehaselwanter I agree, that logic in the get_http_object method does look a bit suspect, but we'll just have to work around it.

I think for our purposes it's entirely sensible to pull the proxy settings from the environment as a fallback. Generally more specific settings should override less specific settings, so the .kitchen.yml proxy settings (if any exist) should override the environment.

I'll try to add something over the next few days, or do feel free to submit a PR if you end up coding something yourself.

from kitchen-oci.

ehaselwanter avatar ehaselwanter commented on August 17, 2024

yeah. I guess it should work like in kitchen-ec2 (https://github.com/test-kitchen/kitchen-ec2/blob/4adaa2a297cb614218025948915527ca153c109f/lib/kitchen/driver/ec2.rb#L403) / https://github.com/test-kitchen/kitchen-ec2#http_proxy . least surprise. for now I'll stick to the patch

from kitchen-oci.

stephenpearson avatar stephenpearson commented on August 17, 2024

@ehaselwanter If you get a chance, could you try out version 1.3.0 in branch feature/proxy_support and in PR #9. It seems to work in my tests, so I will merge it into master if it works for you too.

from kitchen-oci.

ehaselwanter avatar ehaselwanter commented on August 17, 2024

will do and report back tomorrow

from kitchen-oci.

ehaselwanter avatar ehaselwanter commented on August 17, 2024

can verify that it works with export http= as well as kitchen.yml config :-)

from kitchen-oci.

stephenpearson avatar stephenpearson commented on August 17, 2024

Great! , I will merge it. Thank you.

from kitchen-oci.

ehaselwanter avatar ehaselwanter commented on August 17, 2024

tested updated gem. works. thx :-)

from kitchen-oci.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.