Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHolstien committed Jan 16, 2025
1 parent 054bc1f commit 5a6923c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.linkedin.datahub.graphql.QueryContext;
import com.linkedin.datahub.graphql.featureflags.FeatureFlags;
import com.linkedin.datahub.graphql.generated.LinkVersionInput;
import com.linkedin.datahub.graphql.generated.VersionSet;
import com.linkedin.metadata.entity.IngestResult;
import com.linkedin.metadata.entity.versioning.EntityVersioningService;
import com.linkedin.metadata.entity.versioning.VersionPropertiesInput;
Expand Down Expand Up @@ -56,8 +57,8 @@ public void testGetSuccessful() throws Exception {
Mockito.when(mockEnv.getArgument(Mockito.eq("input"))).thenReturn(input);
Mockito.when(mockEnv.getContext()).thenReturn(mockContext);

String result = resolver.get(mockEnv).get();
assertEquals(result, TEST_ENTITY_URN);
VersionSet result = resolver.get(mockEnv).get();
assertEquals(result.getUrn(), TEST_ENTITY_URN);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void testGetSuccessful() throws Exception {
Mockito.when(mockEnv.getArgument(Mockito.eq("input"))).thenReturn(input);
Mockito.when(mockEnv.getContext()).thenReturn(mockContext);

assertTrue(resolver.get(mockEnv).get());
assertNotNull(resolver.get(mockEnv).get());

Mockito.verify(mockService)
.unlinkVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class VersionsSearchResolverTest {

private static final SearchAcrossEntitiesInput BASIC_INPUT =
new SearchAcrossEntitiesInput(
List.of(EntityType.DATASET), "", 0, 10, null, null, null, null, null, null, null, null);
List.of(EntityType.DATASET), "", 0, 10, null, null, null, null, null);

private static final SearchAcrossEntitiesInput COMPLEX_INPUT =
new SearchAcrossEntitiesInput(
Expand Down Expand Up @@ -99,10 +99,7 @@ public class VersionsSearchResolverTest {
.setField("sortField2")
.setSortOrder(SortOrder.ASCENDING)
.build()))
.build(),
null,
null,
null);
.build());

@Test
public void testGetSuccessBasic() throws Exception {
Expand Down

0 comments on commit 5a6923c

Please sign in to comment.