use of com.nextdoor.bender.handler.BaseHandlerTest.DummyHandler in project bender by Nextdoor.
the class BaseHandlerS3Test method testS3Config.
@Test
public void testS3Config() throws HandlerException {
BaseHandler handler = new DummyHandler();
handler.CONFIG_FILE = null;
handler.s3ClientFactory = this.clientFactory;
List<DummyEvent> events = new ArrayList<DummyEvent>(1);
TestContext context = new TestContext();
context.setInvokedFunctionArn("arn:aws:lambda:us-east-1:123:function:test");
handler.handler(events, context);
assertEquals("s3://" + S3_BUCKET + "/bender/config.json", handler.config.getConfigFile());
assertEquals("Test Events", handler.config.getSources().get(0).getName());
}
Aggregations