Skip to content
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

fix: Packagist proxy through HTTP Proxy #646

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ymorocutti
Copy link

Use StreamContextFactory from composer package to create stream context as this method already support HTTP proxy settings

…context as this method already support HTTP proxy settings

[repman-http-proxy]
@ymorocutti ymorocutti force-pushed the feature/repman-http-proxy branch from 621bec4 to 1e7caef Compare April 26, 2023 09:26
@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c384362) 99.03% compared to head (e4b0944) 99.03%.
Report is 3 commits behind head on master.

❗ Current head e4b0944 differs from pull request most recent head 5945ddc. Consider uploading reports for the commit 5945ddc to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #646   +/-   ##
=========================================
  Coverage     99.03%   99.03%           
  Complexity     1916     1916           
=========================================
  Files           301      301           
  Lines          6083     6083           
=========================================
  Hits           6024     6024           
  Misses           59       59           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akondas
Copy link
Member

akondas commented May 28, 2023

Can we add test for that or it will be too complicated?

@ymorocutti
Copy link
Author

Can we add test for that or it will be too complicated?

I could unit test method createContext with fake URL and multiple proxy/no_proxy settings to make sure options returned to create a context are what we expect.

@akondas
Copy link
Member

akondas commented May 31, 2023

Can we add test for that or it will be too complicated?

I could unit test method createContext with fake URL and multiple proxy/no_proxy settings to make sure options returned to create a context are what we expect.

Works for me, at least test will concrete solution 😅

@ymorocutti
Copy link
Author

@akondas

Should be good now, I've done some tests to verify stream context on multiple case:

  • Without any configured proxy
  • With usage of HTTP_PROXY
  • With usage of HTTP_PROXY and NO_PROXY

…e tests to check that stream context is correctly built when using http proxy

[repman-http-proxy]
@ymorocutti ymorocutti force-pushed the feature/repman-http-proxy branch from 0ecbb27 to 8d05acd Compare June 7, 2023 09:38
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