CORDA-2482 - Fix issue with devModeOptions.allowCompatabilityZone not working (#4613) (#4616)

This commit is contained in:
Anthony Keenan 2019-01-23 09:44:52 +00:00 committed by Katelyn Baker
parent 34818634d1
commit 18d00d9e42

View File

@ -93,7 +93,7 @@ open class SharedNodeCmdLineOptions {
class InitialRegistrationCmdLineOptions : SharedNodeCmdLineOptions() { class InitialRegistrationCmdLineOptions : SharedNodeCmdLineOptions() {
override fun parseConfiguration(configuration: Config): Valid<NodeConfiguration> { override fun parseConfiguration(configuration: Config): Valid<NodeConfiguration> {
return super.parseConfiguration(configuration).doIfValid { config -> return super.parseConfiguration(configuration).doIfValid { config ->
require(!config.devMode) { "Registration cannot occur in development mode" } require(!config.devMode || config.devModeOptions?.allowCompatibilityZone == true)
require(config.compatibilityZoneURL != null || config.networkServices != null) { require(config.compatibilityZoneURL != null || config.networkServices != null) {
"compatibilityZoneURL or networkServices must be present in the node configuration file in registration mode." "compatibilityZoneURL or networkServices must be present in the node configuration file in registration mode."
} }
@ -165,7 +165,6 @@ open class NodeCmdLineOptions : SharedNodeCmdLineOptions() {
override fun parseConfiguration(configuration: Config): Valid<NodeConfiguration> { override fun parseConfiguration(configuration: Config): Valid<NodeConfiguration> {
return super.parseConfiguration(configuration).doIfValid { config -> return super.parseConfiguration(configuration).doIfValid { config ->
if (isRegistration) { if (isRegistration) {
require(!config.devMode) { "Registration cannot occur in development mode" }
require(config.compatibilityZoneURL != null || config.networkServices != null) { require(config.compatibilityZoneURL != null || config.networkServices != null) {
"compatibilityZoneURL or networkServices must be present in the node configuration file in registration mode." "compatibilityZoneURL or networkServices must be present in the node configuration file in registration mode."
} }