@Test public void testS3DecorateWithOverrides() { Map<String, SaltPillarProperties> servicePillar = new HashMap<>(); Map<String, Object> overrides = new HashMap<>(); overrides.put("providerPrefix", "s3a"); TelemetryClusterDetails clusterDetails = TelemetryClusterDetails.Builder.builder().withPlatform("AWS").build(); FluentConfigView fluentConfigView = new FluentConfigView.Builder() .withClusterDetails(clusterDetails) .withEnabled(true) .withS3LogArchiveBucketName("mybucket") .withLogFolderName("cluster-logs/datahub/cl1") .withProviderPrefix("s3") .withOverrideAttributes(overrides) .build(); DatabusConfigView dataConfigView = new DatabusConfigView.Builder() .build(); mockConfigServiceResults(dataConfigView, fluentConfigView, new MeteringConfigView.Builder().build()); Map<String, SaltPillarProperties> result = underTest.decoratePillar(servicePillar, createStack(), new Telemetry()); Map<String, Object> results = createMapFromFluentPillars(result, "fluent"); assertEquals(results.get("providerPrefix"), "s3a"); assertEquals(results.get("s3LogArchiveBucketName"), "mybucket"); assertEquals(results.get("logFolderName"), "cluster-logs/datahub/cl1"); assertEquals(results.get("enabled"), true); }
public Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar, Stack stack, Telemetry telemetry) { return decoratePillar(servicePillar, stack, telemetry, null); }
TelemetryDecorator { public Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar, Stack stack, Telemetry telemetry) { return decoratePillar(servicePillar, stack, telemetry, null); } }
TelemetryDecorator { public Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar, Stack stack, Telemetry telemetry) { return decoratePillar(servicePillar, stack, telemetry, null); } TelemetryDecorator(DatabusConfigService databusConfigService,
            FluentConfigService fluentConfigService,
            MeteringConfigService meteringConfigService,
            MonitoringConfigService monitoringConfigService,
            TelemetryCommonConfigService telemetryCommonConfigService,
            AltusMachineUserService altusMachineUserService,
            VmLogsService vmLogsService,
            @Value("${info.app.version:}") String version); }
TelemetryDecorator { public Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar, Stack stack, Telemetry telemetry) { return decoratePillar(servicePillar, stack, telemetry, null); } TelemetryDecorator(DatabusConfigService databusConfigService,
            FluentConfigService fluentConfigService,
            MeteringConfigService meteringConfigService,
            MonitoringConfigService monitoringConfigService,
            TelemetryCommonConfigService telemetryCommonConfigService,
            AltusMachineUserService altusMachineUserService,
            VmLogsService vmLogsService,
            @Value("${info.app.version:}") String version); Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar,
            Stack stack, Telemetry telemetry); Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar,
            Stack stack, Telemetry telemetry, DataBusCredential dataBusCredential); }
TelemetryDecorator { public Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar, Stack stack, Telemetry telemetry) { return decoratePillar(servicePillar, stack, telemetry, null); } TelemetryDecorator(DatabusConfigService databusConfigService,
            FluentConfigService fluentConfigService,
            MeteringConfigService meteringConfigService,
            MonitoringConfigService monitoringConfigService,
            TelemetryCommonConfigService telemetryCommonConfigService,
            AltusMachineUserService altusMachineUserService,
            VmLogsService vmLogsService,
            @Value("${info.app.version:}") String version); Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar,
            Stack stack, Telemetry telemetry); Map<String, SaltPillarProperties> decoratePillar(Map<String, SaltPillarProperties> servicePillar,
            Stack stack, Telemetry telemetry, DataBusCredential dataBusCredential);  }