InstallIntoDhsCommand extends AbstractInstallerCommand { protected Properties buildDefaultProjectProperties(Options options) { Properties props = new Properties(); for (String key : System.getProperties().stringPropertyNames()) { props.put(key, System.getProperties().getProperty(key)); } props.setProperty("mlIsHostLoadBalancer", "true"); props.setProperty("mlIsProvisionedEnvironment", "true"); props.setProperty("mlAppServicesPort", "8010"); props.setProperty("mlFlowDeveloperRole", "flowDeveloper"); props.setProperty("mlFlowOperatorRole", "flowOperator"); props.setProperty("mlModulePermissions", "data-hub-module-reader,read,data-hub-module-reader,execute,data-hub-environment-manager,update,rest-extension-user,execute"); props.setProperty("mlAppServicesAuthentication", "basic"); props.setProperty("mlFinalAuth", "basic"); props.setProperty("mlJobAuth", "basic"); props.setProperty("mlStagingAuth", "basic"); if (options.isDisableSsl()) { logger.info("Not setting default property values for secure connections to MarkLogic"); } else { setDefaultPropertiesForSecureConnections(props); } return props; }  @Override void run(ApplicationContext context, Options options);  }
@Test public void buildDefaultProjectProperties() { Properties props = new InstallIntoDhsCommand().buildDefaultProjectProperties(new Options()); verifyDefaultProperties(props); assertEquals("https", props.getProperty("mlAdminScheme")); assertEquals("true", props.getProperty("mlAdminSimpleSsl")); assertEquals("https", props.getProperty("mlManageScheme")); assertEquals("true", props.getProperty("mlManageSimpleSsl")); assertEquals("true", props.getProperty("mlAppServicesSimpleSsl")); assertEquals("true", props.getProperty("mlFinalSimpleSsl")); assertEquals("true", props.getProperty("mlJobSimpleSsl")); assertEquals("true", props.getProperty("mlStagingSimpleSsl")); }
@Test public void buildDefaultProjectPropertiesWithoutSslEnabled() { Options options = new Options(); options.setDisableSsl(true); Properties props = new InstallIntoDhsCommand().buildDefaultProjectProperties(options); verifyDefaultProperties(props); assertNull(props.getProperty("mlAdminScheme")); assertNull(props.getProperty("mlAdminSimpleSsl")); assertNull(props.getProperty("mlManageScheme")); assertNull(props.getProperty("mlManageSimpleSsl")); assertNull(props.getProperty("mlAppServicesSimpleSsl")); assertNull(props.getProperty("mlFinalSimpleSsl")); assertNull(props.getProperty("mlJobSimpleSsl")); assertNull(props.getProperty("mlStagingSimpleSsl")); }