-
Notifications
You must be signed in to change notification settings - Fork 194
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
Update testcase to emulate corporate proxy #2895
Update testcase to emulate corporate proxy #2895
Conversation
Signed-off-by: Torbjörn SVENSSON <[email protected]>
To build/test you usually do:
then cd into tycho-its then call
|
Why is this wrong? I'm not sure if such thing can ever work in a unit test reliable as name service is different from proxy service. So if you like to have that we either also need to mock a DNS server or one needs to configure a mirror or similar. |
Well, if you want the real deal, then no, it would not work, but I'm using a different approach.
Obviously, Do you think this way to emulate the scenario with a corporate network that requires to go thought a proxy to get out is valid? Now that I'm thinking about this a 2nd time, I might have missed to replace all links to |
Alright, but now the test fails with a message that proxy was not used while I would expect that it should fail with |
@Torbjorn-Svensson there was a fix in the proxy support recently do you want to rebase your change and see if it fixes your issue? |
@Torbjorn-Svensson can you rebase and resolve conflicts? |
I'm closing this as no feedback from the original author, if this is still interesting just open a PR with an up-to-date version. |
The testcase wrongly assumed that the client can resolve the domain name.
Some corporate networks with proxy have internal name servers that does not include public records and this, resolving any non-internal domain names will fail. The proxy servers are having one leg in the real world and can thus resolve public records.
I've only updated the test case as I'm unable to build of tycho for some unknown reason.
To validate that the testcase did the intended, I had to:
/pom.xml
excepttycho-its
andtycho-testing-harness
./tycho-its/src/test/java/
except/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO279HttpProxy/ProxySupportTest.java
.mvn -Dtycho-build-version=4.0.3 clean package
.Hope this fulfills the request for help in #2709 (comment).