public async Task DoesNotThrowIfTableIsReturnedInListingButCannotBeDescribed()
        {
            var mockery   = new DynamoAlarmGeneratorMockery();
            var generator = mockery.AlarmGenerator;

            mockery.GivenAListOfTables(new[] { "banana", "apple" });
            mockery.GivenATable("apple", 1300, 600);
            mockery.ValidSnsTopic();

            var config = new WatchmanConfiguration()
            {
                AlertingGroups = new List <AlertingGroup>()
                {
                    new AlertingGroup()
                    {
                        Name            = "TestGroup",
                        AlarmNameSuffix = "TestGroup",
                        DynamoDb        = new DynamoDb()
                        {
                            Tables = new List <Table>
                            {
                                new Table {
                                    Pattern = "^.*$"
                                }
                            }
                        }
                    }
                }
            };

            await generator.GenerateAlarmsFor(config, RunMode.GenerateAlarms);
        }
Exemple #2
0
 private static void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
 {
     mockery.ValidSnsTopic();
     mockery.GivenAListOfTables(new[] { "test-a-table", "other-table" });
     mockery.GivenATable("test-a-table", 1300, 600);
     mockery.GivenATable("other-table", 1300, 600);
 }
        private static void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
        {
            mockery.GivenAListOfTables(new string[] { "authentication-tokens" });
            mockery.GivenATableWithIndex("authentication-tokens", "ThisIsAnIndex", 1300, 600);

            mockery.ValidSnsTopic();
        }
        private static void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
        {
            mockery.GivenAListOfTables(new[] { "test1", "test2" });

            mockery.GivenATable("test1", ReadCapacity, WriteCapacity);
            mockery.GivenATable("test2", ReadCapacity, WriteCapacity);

            mockery.ValidSnsTopic();
        }
Exemple #5
0
        private static void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
        {
            mockery.GivenAListOfTables(new[] { "test-a-table", "customer-table", "test-supplier-table", "products-table" });

            mockery.GivenATable("test-a-table", 1300, 600);
            mockery.GivenATable("customer-table", 2800, 1130);
            mockery.GivenATable("test-supplier-table", 400, 100);
            mockery.GivenATable("products-table", 2400, 80);

            mockery.ValidSnsTopic();
        }
Exemple #6
0
        private static void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
        {
            mockery.GivenAListOfTables(
                new[] { "test-a-table", "customer-table", "test-supplier-table", "products-table" });

            mockery.GivenATableWithIndex("test-a-table", "ConsumerIdIndex", 1300, 600);
            mockery.GivenATable("customer-table", 2800, 1130);
            mockery.GivenATable("test-supplier-table", 400, 100);
            mockery.GivenATableWithIndex("products-table", "ThisIsAnIndex", 452, 550);

            mockery.ValidSnsTopic();
        }
Exemple #7
0
 private static void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
 {
     mockery.ValidSnsTopic();
     mockery.GivenAListOfTables(new string[0]);
 }