Skip to content

Commit

Permalink
https://github.com/docker/buildx/issues/850
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh committed Dec 14, 2021
1 parent 0c43445 commit 39a7e19
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ignore everything
**

!dist/*.whl
!dist
!README.md
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ lib-release: lib-package

lib-doc:
python -m tox -e build-docs && \
$(OPEN) .tox/build-docs/docs_out/index.html
$(OPEN) .tox/build-docs/docs_out/index.html || true

lib-coverage:
pytest --cov=proxy --cov=tests --cov-report=html tests/ && \
$(OPEN) htmlcov/index.html
$(OPEN) htmlcov/index.html || true

lib-profile:
ulimit -n 65536 && \
Expand Down
1 change: 1 addition & 0 deletions requirements-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tox==3.24.4
mccabe==0.6.1
pylint==2.12.2
rope==0.22.0
httpx[http2]
32 changes: 32 additions & 0 deletions tests/http/test_http2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE for more details.
"""
import httpx

from proxy import TestCase


class TestHttp2WithProxy(TestCase):

def test_http2_via_proxy(self) -> None:
assert self.PROXY
response = httpx.get(
'https://httpbin.org/get',
headers={'accept': 'application/json'},
verify=httpx.create_ssl_context(http2=True),
timeout=httpx.Timeout(timeout=5.0),
proxies={
'all://': 'http://localhost:%d' % self.PROXY.flags.port,
},
)
self.assertEqual(response.status_code, 200)

# def test_http2_streams_over_proxy_keep_alive_connection(self) -> None:
# pass

0 comments on commit 39a7e19

Please sign in to comment.