Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Framework tests fail using ssh tunnels #189

Closed
bradmann opened this issue Mar 13, 2014 · 6 comments
Closed

Framework tests fail using ssh tunnels #189

bradmann opened this issue Mar 13, 2014 · 6 comments
Labels
Milestone

Comments

@bradmann
Copy link
Contributor

It looks like if there's a mismatch between the port number your browser is hitting and the actual port the test appserver is running on, test:easy-url() returns the port your browser provides, rather than the correct port.

@dmcassel
Copy link
Collaborator

I don't follow... can you clarify this?

@bradmann
Copy link
Contributor Author

There are a few systems that we only have access to through ssh tunneling (ssh -L 9042:localhost:8042 ). It seems like when we setup the tunnel on a different external port than the actual port the service is running on, 2 of the tests in the "Framework Tests" section fail due to the port mismatch.

@dmcassel dmcassel added the bug label Apr 18, 2014
@grtjn
Copy link
Contributor

grtjn commented Jul 7, 2015

Bit old ticket, but would be helpful to know which tests fail. Might save us setup a tunnel to reproduce ourselves. The test-helper seems to rely on xdmp:get-request-header("Host")..

@bradmann
Copy link
Contributor Author

bradmann commented Jul 7, 2015

routing.xqy and site-index.xqy under "Framework Tests"

If you have a VM, just ssh to it using -L 10042:localhost:8042 and point your browser to http://localhost:10042/tests/

You may even be able to ssh to your local machine and reproduce, but I haven't attempted that to verify.

@grtjn
Copy link
Contributor

grtjn commented Jul 7, 2015

Yep, that worked. It fails because it takes the port number from the browser, but it is doing an http-get against 'localhost', which is executed server-side. It should really simply use xdmp:get-request-port(). That seems to solve this. I will do a PR..

grtjn added a commit to grtjn/roxy that referenced this issue Jul 7, 2015
@grtjn grtjn modified the milestone: 1.7.3 Jul 7, 2015
grtjn added a commit that referenced this issue Sep 17, 2015
Fixed #189: don't get port from browser for server-side localhost http-get
@grtjn
Copy link
Contributor

grtjn commented Sep 17, 2015

Fixed in dev

@grtjn grtjn closed this as completed Sep 17, 2015
grtjn added a commit to grtjn/roxy that referenced this issue Jan 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants