Skip to content

Commit

Permalink
test(urn-validation): additional test case (datahub-project#12001)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Dec 3, 2024
1 parent a004c92 commit 82774bb
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,19 @@ public void testUrnWithIllegalDelimiter() {
}

@Test(expectedExceptions = IllegalArgumentException.class)
public void testComplexUrnWithParens() {
public void testComplexUrnWithParens1() {
Urn invalidUrn = UrnUtils.getUrn("urn:li:dataset:(urn:li:dataPlatform:hdfs,(illegal),PROD)");
ValidationApiUtils.validateUrn(entityRegistry, invalidUrn, true);
}

@Test(expectedExceptions = IllegalArgumentException.class)
public void testComplexUrnWithParens2() {
Urn invalidUrn =
UrnUtils.getUrn(
"urn:li:dataJob:(urn:li:dataFlow:(mssql,1/2/3/4.c_n on %28LOCAL%29,PROD),1/2/3/4.c_n on (LOCAL))");
ValidationApiUtils.validateUrn(entityRegistry, invalidUrn, true);
}

@Test(expectedExceptions = IllegalArgumentException.class)
public void testSimpleUrnWithParens() {
Urn invalidUrn = UrnUtils.getUrn("urn:li:corpuser:(foo)123");
Expand Down

0 comments on commit 82774bb

Please sign in to comment.