[Bug 1698222] Re: unit tests fail if https_proxy is set

Brian Murray brian at ubuntu.com
Fri Jun 16 14:38:48 UTC 2017


Thanks for working on this, there is a typo in the changelog entry of
the word "running" that might be worth fixing.

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-boto in Ubuntu.
https://bugs.launchpad.net/bugs/1698222

Title:
  unit tests fail if https_proxy is set

Status in boto:
  New
Status in python-boto package in Ubuntu:
  In Progress

Bug description:
  https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac
  /autopkgtest-artful/artful/amd64/p/python-
  boto/20170531_165016_ad9d3@/log.gz

  Python-boto unit tests don't like *_proxy env vars set during
  execution.  They do not reach out to the network, but different
  codepaths are taken when a proxy is detected, and the mocks get
  destroyed in that case.

  A lot of failures of the form:

  ======================================================================
  FAIL: test_head_bucket_other (tests.unit.s3.test_connection.TestHeadBucket)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/tmp/autopkgtest.JJMfC2/autopkgtest_tmp/tests/unit/s3/test_connection.py", line 331, in test_head_bucket_other
      self.assertEqual(err.status, 405)
  AssertionError: 403 != 405
  -------------------- >> begin captured logging << --------------------
  boto: DEBUG: Using access key provided by client.
  boto: DEBUG: Using secret key provided by client.
  boto: DEBUG: path=/
  boto: DEBUG: auth_path=/you-broke-it/
  boto: DEBUG: Method: HEAD
  boto: DEBUG: Path: https://you-broke-it.s3.amazonaws.com/
  boto: DEBUG: Data: 
  boto: DEBUG: Headers: {}
  boto: DEBUG: Host: you-broke-it.s3.amazonaws.com
  boto: DEBUG: Port: 443
  boto: DEBUG: Params: {}
  boto: DEBUG: establishing HTTPS connection: host=you-broke-it.s3.amazonaws.com, kwargs={'port': 443, 'timeout': 70}
  boto: DEBUG: Proxy connection: CONNECT you-broke-it.s3.amazonaws.com:443 HTTP/1.0

  boto: DEBUG: Token: None
  boto: DEBUG: StringToSign:
  HEAD

  
  Wed, 31 May 2017 16:49:14 GMT
  /you-broke-it/
  boto: DEBUG: Signature:
  AWS aws_access_key_id:Sy9u+sHaYcVAlgRndJo4iOD3mCY=
  boto: DEBUG: Final headers: {'Date': 'Wed, 31 May 2017 16:49:14 GMT', 'Content-Length': '0', 'Authorization': u'AWS aws_access_key_id:Sy9u+sHaYcVAlgRndJo4iOD3mCY=', 'User-Agent': 'Boto/2.44.0 Python/2.7.13 Linux/4.10.0-21-generic'}
  boto: DEBUG: Response headers: [('x-amz-id-2', 'R8k7qp47lyMqK4+O5bc5vLcFHbwHB64IifV0XEyEdJSNC7q1FGe3o/7LkUGjkR3eYBjDwyE8Oz8='), ('server', 'AmazonS3'), ('transfer-encoding', 'chunked'), ('x-amz-request-id', 'E92141CA21DA2EEC'), ('date', 'Wed, 31 May 2017 16:49:14 GMT'), ('content-type', 'application/xml')]
  --------------------- >> end captured logging << ---------------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/boto/+bug/1698222/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list