From 82b9f64a0a12f4ab7d981f943db75b1dd02f45ab Mon Sep 17 00:00:00 2001 From: David Leifker Date: Wed, 7 Dec 2022 11:09:50 -0600 Subject: [PATCH] Added test, pulled master --- .../src/test/java/com/linkedin/metadata/ESTestUtils.java | 2 +- .../elasticsearch/fixtures/SampleDataFixtureTests.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/metadata-io/src/test/java/com/linkedin/metadata/ESTestUtils.java b/metadata-io/src/test/java/com/linkedin/metadata/ESTestUtils.java index 5918b8975e35c..03fba10bf868f 100644 --- a/metadata-io/src/test/java/com/linkedin/metadata/ESTestUtils.java +++ b/metadata-io/src/test/java/com/linkedin/metadata/ESTestUtils.java @@ -1,7 +1,7 @@ package com.linkedin.metadata; import com.datahub.authentication.Authentication; -import com.datahub.authorization.Authorizer; +import com.datahub.plugins.auth.authorization.Authorizer; import com.linkedin.common.urn.Urn; import com.linkedin.datahub.graphql.QueryContext; import com.linkedin.datahub.graphql.generated.AutoCompleteResults; diff --git a/metadata-io/src/test/java/com/linkedin/metadata/search/elasticsearch/fixtures/SampleDataFixtureTests.java b/metadata-io/src/test/java/com/linkedin/metadata/search/elasticsearch/fixtures/SampleDataFixtureTests.java index addb82fe0fa13..6a041178baa80 100644 --- a/metadata-io/src/test/java/com/linkedin/metadata/search/elasticsearch/fixtures/SampleDataFixtureTests.java +++ b/metadata-io/src/test/java/com/linkedin/metadata/search/elasticsearch/fixtures/SampleDataFixtureTests.java @@ -108,6 +108,14 @@ public void testUrn() { ); } + @Test + public void testExactTable() { + SearchResult results = search(searchService, "stg_customers"); + assertEquals(results.getEntities().size(), 1, "Unexpected single urn result for `stg_customers`"); + assertEquals(results.getEntities().get(0).getEntity().toString(), + "urn:li:dataset:(urn:li:dataPlatform:dbt,cypress_project.jaffle_shop.stg_customers,PROD)"); + } + @Test public void testStemming() { List> testSets = List.of(