Skip to content

Fix tests to stub the with https #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

thinkerbot
Copy link
Collaborator

I'm not sure what the difference is but my hypothesis is that the old set of stubs don't work with old docker versions (I'm on 1.6.1 currently). Could be old docker parses urls in a more naive way and forces the protocol from tcp => https. I was getting errors like:

  "this is stubbed"
  stub_request(:get, "http://tcp//example.com:5422/v1 ...

  "you need to stub this"
  stub_request(:get, "https://example.com:5422/v1 ...

And note this is how the docker url is set in the helper:

  Docker.url = 'tcp://example.com:5422'

Probably should not merge this if this fix doesn't work on newer docker. Might be I should just upgrade.

I'm not sure what the difference is but my hypothesis is that the old
set of stubs don't work with old docker versions (I'm on 1.6.1
currently).  Could be old docker parses urls in a more naive way and
forces the protocol from tcp => https.  I was getting erros like:

  "this is stubbed"
  stub_request(:get, "http://tcp//example.com:5422/v1 ...

  "you need to stub this"
  stub_request(:get, "https://example.com:5422/v1 ...

And note this is how the docker url is set in the helper:

  Docker.url = 'tcp://example.com:5422'
@joshughes
Copy link
Owner

This change causes Travis to fail. Docker should not even been installed on the system for the tests to work... we are mocking out each call that should be made I am fairly sure. Also my docker version is 1.9.2. I know for a fact that Travis has no docker installed though... I still think this is some sort of system setting or version problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants