Skip to content

Commit

Permalink
Lineage IT test.
Browse files Browse the repository at this point in the history
  • Loading branch information
knighto82 committed Jan 14, 2025
1 parent a1b10ad commit 3bb3d21
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,17 @@ public void testUpdateDataset() {
@Test
public void testUpdateDatasetLineage() {
// Given
wireMockRule.stubFor(WireMock.put(WireMock.urlEqualTo("/catalogs/common/datasets/SD0004"))
.withRequestBody(equalToJson(TestUtils.loadJsonForIt("dataset/dataset-SD0004-update-request.json")))
wireMockRule.stubFor(WireMock.post(WireMock.urlEqualTo("/catalogs/common/datasets/SD0002/lineage"))
.withRequestBody(equalToJson(TestUtils.loadJsonForIt("dataset/dataset-SD0002-lineage-create-request.json")))
.withHeader("Content-Type", WireMock.equalTo("application/json"))
.willReturn(WireMock.aResponse()
.withHeader("Content-Type", "application/json")
.withStatus(200)
.withBodyFile("dataset/dataset-update-response.json")));
.withStatus(200)));

Dataset dataset = getSdk().builders().dataset().build();
Dataset dataset = getSdk().builders().dataset()
.identifier("SD0002")
.catalogIdentifier("common")
.build();


// When & Then
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"source" : [ {
"catalog" : "foo",
"dataset" : "d1"
}, {
"catalog" : "foo",
"dataset" : "d2"
}, {
"catalog" : "bar",
"dataset" : "d1"
}, {
"catalog" : "bar",
"dataset" : "d3"
} ]
}

0 comments on commit 3bb3d21

Please sign in to comment.