Skip to content

tests: run stunnel for HTTPS and FTPS on a dynamic port - #5267

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/tests-stunnel-dynport
Closed

tests: run stunnel for HTTPS and FTPS on a dynamic port#5267
bagder wants to merge 1 commit into
masterfrom
bagder/tests-stunnel-dynport

Conversation

@bagder

@bagder bagder commented Apr 19, 2020

Copy link
Copy Markdown
Member

This is achieved by iterating over a series of random high number ports and stick to the first one that works for stunnel.

@bagder bagder added the tests label Apr 19, 2020
@bagder
bagder force-pushed the bagder/tests-stunnel-dynport branch from 9b82185 to e9f7885 Compare April 20, 2020 06:20
bagder added a commit that referenced this pull request Apr 20, 2020
stunnel is an external tool and it has no specific option to export the
actually used port number, runtests tries to figure that out by parsing the
stunnel log. This is fragile. As a backup, it runs "netstat -ptln" in an
attempt to see what stunnel listens to.

Closes #5267
@bagder
bagder force-pushed the bagder/tests-stunnel-dynport branch from e9f7885 to d0ac29a Compare April 20, 2020 06:25
bagder added a commit that referenced this pull request Apr 20, 2020
stunnel is an external tool and it has no specific option to export the
actually used port number. Runtests tries to figure it out by parsing
the stunnel log. This is fragile. As a backup, it runs "netstat -ptln"
in an attempt to see what stunnel listens to. That's not going to be
widely portable.

Closes #5267
@bagder
bagder force-pushed the bagder/tests-stunnel-dynport branch from d0ac29a to 945cd06 Compare April 20, 2020 09:08
@bagder bagder changed the title tests: run stunnel (for HTTPS) on a dynamic port tests: run stunnel for HTTPS and FTP on a dynamic port Apr 20, 2020
@bagder
bagder force-pushed the bagder/tests-stunnel-dynport branch from 945cd06 to f924991 Compare April 21, 2020 07:33
@bagder
bagder marked this pull request as ready for review April 21, 2020 07:33
As stunnel is an external tool and it has no specific option to export
the actually used port number when asked to listen to 0, runtests
instead iterates over ten randomly picked high number ports and sticks
to the first one stunnel can listen to.

Closes #5267
@bagder
bagder force-pushed the bagder/tests-stunnel-dynport branch from f924991 to e97b1e8 Compare April 21, 2020 08:00
@bagder bagder changed the title tests: run stunnel for HTTPS and FTP on a dynamic port tests: run stunnel for HTTPS and FTPS on a dynamic port Apr 21, 2020
@mback2k
mback2k self-requested a review April 21, 2020 17:05
@mback2k

mback2k commented Apr 21, 2020

Copy link
Copy Markdown
Member

Please give me a chance to test this locally on Windows before merging. I will try to do that now.

@mback2k mback2k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is passing my local tests on Windows 👍

@bagder bagder self-assigned this Apr 26, 2020
@mback2k mback2k added the feature-window A merge of this requires an open feature window label Apr 27, 2020
@bagder bagder closed this in 9a8fa07 Apr 30, 2020
@bagder
bagder deleted the bagder/tests-stunnel-dynport branch April 30, 2020 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-window A merge of this requires an open feature window tests

Development

Successfully merging this pull request may close these issues.

2 participants