Пример #1
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);
 }
        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);
        }
        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.GivenATableWithIndex("happy-table-1", "happy-index-1", 1300, 600);
            mockery.GivenATableWithIndex("happy-table-2", "happy-index-2", 50, 15);
            mockery.GivenATableDoesNotExist("failure-table-1");

            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();
        }
        private void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
        {
            mockery.ValidSnsTopic();

            mockery.GivenATable("test-a-table", 1300, 600);
            mockery.GivenATable("my-orders", 4000, 800);

            mockery.GivenATableDoesNotExist("this-table-does-not-exist");
        }
Пример #7
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();
        }
Пример #8
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();
        }
Пример #9
0
 private static void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
 {
     mockery.GivenATable("table-that-exists", 1300, 600);
     mockery.ValidSnsTopic();
 }
Пример #10
0
 private static void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
 {
     mockery.ValidSnsTopic();
     mockery.GivenAListOfTables(new string[0]);
 }
Пример #11
0
 private void ConfigureTables(DynamoAlarmGeneratorMockery mockery)
 {
     mockery.ValidSnsTopic();
     mockery.GivenATable("orders", 4000, 800);
 }