-
Notifications
You must be signed in to change notification settings - Fork 79
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
Config validation on programmatic start #435
Config validation on programmatic start #435
Conversation
components/proxy/src/main/kotlin/com/hotels/styx/StyxConfigValidation.kt
Outdated
Show resolved
Hide resolved
components/proxy/src/main/kotlin/com/hotels/styx/StyxConfigValidation.kt
Outdated
Show resolved
Hide resolved
components/proxy/src/test/java/com/hotels/styx/StyxConfigValidationKtTest.java
Outdated
Show resolved
Hide resolved
components/common/src/main/java/com/hotels/styx/common/testing/ExceptionExpectation.java
Outdated
Show resolved
Hide resolved
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 avoid adding new classes unless absolutely necessary.
Kotlin tests already provide exception matchers out of box. No need to implement them.
The laziness seems a premature optimisation which also adds bloat to the code. I would encourage removing that. Unless I am missing something?
components/proxy/src/main/kotlin/com/hotels/styx/StyxConfigValidation.kt
Outdated
Show resolved
Hide resolved
components/proxy/src/main/java/com/hotels/styx/startup/StyxServerComponents.java
Outdated
Show resolved
Hide resolved
Validate config when StyxServer is started programmatically
Have config validation take place when StyxServer is created programmatically, e.g. for tests.