-
Notifications
You must be signed in to change notification settings - Fork 14
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
Added https support and a docker file #45
base: master
Are you sure you want to change the base?
Conversation
} catch (ParseException e) { | ||
System.err.println("Error parsing command line options: " + e.getMessage()); | ||
HelpFormatter formatter = new HelpFormatter(); | ||
formatter.printHelp("myapp", options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should "myapp" be "httpbin" or args[0]
or something sensible?
@@ -43,13 +43,13 @@ public final class HttpBinTest { | |||
|
|||
@Before | |||
public void setUp() throws Exception { | |||
httpBin = new HttpBin(httpBinEndpoint); | |||
httpBin = new HttpBin("127.0.0.1", 8001, 0, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the intent here? Previously the tests used a zero port which selects a free port so it does not conflict with other running services. Please revert.
|
||
RUN mvn clean install | ||
|
||
FROM eclipse-temurin:17-jdk-jammy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a Dockerfile in a separate PR. But I am concerned with using such an old JDK instead of something more recent and streamlined like S3Proxy does:
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); | ||
sslContextFactory.setKeyStorePath(keystore); | ||
sslContextFactory.setKeyStorePassword("123456"); | ||
sslContextFactory.setKeyManagerPassword("123456"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the best way to configure the keystore? Shouldn't it come from some external source like S3Proxy does?
|
||
/** | ||
* Reimplementation of HttpBin https://httpbin.org/ suitable for offline unit | ||
* tests. | ||
*/ | ||
public final class HttpBin { | ||
private final Server server; | ||
private final int mHTTPPort; | ||
private final int mHTTPsPort; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use the m
prefix since nothing else does for members.
mHTTPPort = httpPort; | ||
mHTTPsPort = httpsPort; | ||
List<Connector> connectors = new ArrayList<Connector>(); | ||
if (httpPort != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to support the 0 port for automatic assignment and use something like -1 to mean do not use HTTP?
@guyarb do we have a path forward on this PR? |
1 similar comment
@guyarb do we have a path forward on this PR? |
No description provided.