Skip to content

Commit

Permalink
distrib/DownloadBundlePlannerTest.java: replace project-open-data.cio…
Browse files Browse the repository at this point in the history
….gov

  test URL that doesn't behave the same as before
  • Loading branch information
RayPlante committed Aug 23, 2024
1 parent ea69349 commit 32bb84b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void getBundleDownloadPlanTest()
{
FileRequest[] inputfileList = new FileRequest[2];
String val1 = "{\"filePath\":\"/1894/license.pdf\",\"downloadUrl\":\"https://s3.amazonaws.com/nist-midas/1894/license.pdf\"}";
String val2 = "{\"filePath\":\"/1894/license2.pdf\",\"downloadUrl\":\"https://project-open-data.cio.gov/v1.1/schema/\"}";
String val2 = "{\"filePath\":\"/1894/license2.pdf\",\"downloadUrl\":\"https://wikipedia.net/wiki/URL_redirection\"}";

ObjectMapper mapper = new ObjectMapper();
FileRequest testval1 = mapper.readValue(val1, FileRequest.class);
Expand All @@ -56,12 +56,12 @@ public void getBundleDownloadPlanTest()
inputfileList[1] = testval2;
BundleRequest bFL = new BundleRequest("testdownload", inputfileList, 0,2);
DownloadBundlePlanner dpl = new DownloadBundlePlanner(bFL, 200000, 3,
"s3.amazonaws.com|project-open-data.cio.gov", "testdownload", 1);
"s3.amazonaws.com|wikipedia.net", "testdownload", 5);
BundleDownloadPlan bundlePlan = dpl.getBundleDownloadPlan();
assertEquals(bundlePlan.getPostEachTo(), "_bundle");
assertEquals(bundlePlan.getStatus(), "complete");
assertEquals(bundlePlan.getBundleNameFilePathUrl().length, 1);
assertEquals(bundlePlan.getBundleNameFilePathUrl()[0].getIncludeFiles().length, 2);
assertEquals(bundlePlan.getBundleNameFilePathUrl().length, 2);
assertEquals(bundlePlan.getBundleNameFilePathUrl()[0].getIncludeFiles().length, 1);

}

Expand Down

0 comments on commit 32bb84b

Please sign in to comment.