private async Task TestLaunchJob() { //ARRANGE StartJobRunRequest Request = new StartJobRunRequest() { JobName = "CUR File ETL", Timeout = 1440, // 24 Hours Arguments = new Dictionary <string, string>() { { "--table", "2018-10-01" }, { "--database", "billingdata" }, { "--destination_bucket", $"{User}-billing-formatted" } } }; IAmazonGlue GlueClient; if (Creds != null) { GlueClient = new AmazonGlueClient(Creds); } else { GlueClient = new AmazonGlueClient(); } // ACT StartJobRunResponse Response = await GlueClient.StartJobRunAsync(Request); // ASSERT Assert.NotNull(Response); Assert.Equal(HttpStatusCode.OK, Response.HttpStatusCode); }
private async Task TestNonExistentGlueTable() { // ARRANGE IAmazonGlue GlueClient; if (Creds != null) { GlueClient = new AmazonGlueClient(Creds); } else { GlueClient = new AmazonGlueClient(); } GetTableRequest Request = new GetTableRequest() { DatabaseName = "test", Name = "test" }; // ACT / ASSERT await Assert.ThrowsAsync <EntityNotFoundException>(async() => await GlueClient.GetTableAsync(Request)); }