Exemple #1
0
        public void EmptySettingsTest()
        {
            var settings = new List <SettingsTypeSection>();

            DcaSettings.AddDcaSettingsIfRequired(settings);
            ValidateCorrectSettings(settings);
        }
Exemple #2
0
        public void JustDiagnosticsSectionTest()
        {
            var settings = new List <SettingsTypeSection>
            {
                new SettingsTypeSection
                {
                    Name      = Constants.SectionNames.Diagnostics,
                    Parameter = new SettingsTypeSectionParameter[0]
                }
            };

            DcaSettings.AddDcaSettingsIfRequired(settings);
            ValidateCorrectSettings(settings);
        }
Exemple #3
0
        public void PartialSettingsTest()
        {
            var settings = new List <SettingsTypeSection>
            {
                new SettingsTypeSection
                {
                    Name      = Constants.SectionNames.Diagnostics,
                    Parameter = new[]
                    {
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.ProducerInstances,
                            Value = TestEtlProducerSectionName
                        }
                    }
                },
                new SettingsTypeSection
                {
                    Name      = TestEtlProducerSectionName,
                    Parameter = new []
                    {
                        new SettingsTypeSectionParameter
                        {
                            Name  = EtlProducerValidator.WindowsFabricEtlTypeParamName,
                            Value = EtlProducerValidator.DefaultEtl
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.ProducerType,
                            Value = DcaStandardPluginValidators.EtlFileProducer
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.IsEnabled,
                            Value = "true"
                        }
                    }
                }
            };

            DcaSettings.AddDcaSettingsIfRequired(settings);
            ValidateCorrectSettings(settings);
        }
Exemple #4
0
        public void CompleteSettingsTest()
        {
            var settings = new List <SettingsTypeSection>
            {
                new SettingsTypeSection
                {
                    Name      = Constants.SectionNames.Diagnostics,
                    Parameter = new[]
                    {
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.ProducerInstances,
                            Value = string.Join(
                                ", ",
                                TestEtlProducerSectionName,
                                TestQueryEtlProducerSectionName,
                                TestOperationalEtlProducerSectionName,
                                TestPerfCtrProducerSectionName,
                                TestCrashDumpProducerSectionName)
                        }
                    }
                },
                new SettingsTypeSection
                {
                    Name      = TestEtlProducerSectionName,
                    Parameter = new []
                    {
                        new SettingsTypeSectionParameter
                        {
                            Name  = EtlProducerValidator.WindowsFabricEtlTypeParamName,
                            Value = EtlProducerValidator.DefaultEtl
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.ProducerType,
                            Value = DcaStandardPluginValidators.EtlFileProducer
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.IsEnabled,
                            Value = "true"
                        }
                    }
                },
                new SettingsTypeSection
                {
                    Name      = TestQueryEtlProducerSectionName,
                    Parameter = new []
                    {
                        new SettingsTypeSectionParameter
                        {
                            Name  = EtlProducerValidator.WindowsFabricEtlTypeParamName,
                            Value = EtlProducerValidator.QueryEtl
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.ProducerType,
                            Value = DcaStandardPluginValidators.EtlFileProducer
                        }
                    }
                },
                new SettingsTypeSection
                {
                    Name      = TestOperationalEtlProducerSectionName,
                    Parameter = new []
                    {
                        new SettingsTypeSectionParameter
                        {
                            Name  = EtlProducerValidator.WindowsFabricEtlTypeParamName,
                            Value = EtlProducerValidator.OperationalEtl
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.ProducerType,
                            Value = DcaStandardPluginValidators.EtlFileProducer
                        }
                    }
                },
                new SettingsTypeSection
                {
                    Name      = TestCrashDumpProducerSectionName,
                    Parameter = new []
                    {
                        new SettingsTypeSectionParameter
                        {
                            Name  = FolderProducerValidator.FolderTypeParamName,
                            Value = FolderProducerValidator.ServiceFabricCrashDumps
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.ProducerType,
                            Value = DcaStandardPluginValidators.FolderProducer
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.IsEnabled,
                            Value = "true"
                        }
                    }
                },
                new SettingsTypeSection
                {
                    Name      = TestPerfCtrProducerSectionName,
                    Parameter = new []
                    {
                        new SettingsTypeSectionParameter
                        {
                            Name  = FolderProducerValidator.FolderTypeParamName,
                            Value = FolderProducerValidator.ServiceFabricPerformanceCounters
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.ProducerType,
                            Value = DcaStandardPluginValidators.FolderProducer
                        },
                        new SettingsTypeSectionParameter
                        {
                            Name  = FabricValidatorConstants.ParameterNames.IsEnabled,
                            Value = "true"
                        }
                    }
                }
            };

            DcaSettings.AddDcaSettingsIfRequired(settings);
            ValidateCorrectSettings(settings);
        }