mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 11:39:12 +00:00
MINOR - fix test suite migration (#21320)
* fix: don't add relationship if test suite exists * style: ran java linting
This commit is contained in:
parent
ca812852d6
commit
f2a67b8501
@ -529,27 +529,29 @@ public class MigrationUtil {
|
||||
"nameHash",
|
||||
newExecutableTestSuite,
|
||||
newExecutableTestSuite.getFullyQualifiedName());
|
||||
|
||||
// add relationship between executable TestSuite with Table
|
||||
testSuiteRepository.addRelationship(
|
||||
newExecutableTestSuite.getExecutableEntityReference().getId(),
|
||||
newExecutableTestSuite.getId(),
|
||||
Entity.TABLE,
|
||||
TEST_SUITE,
|
||||
Relationship.CONTAINS);
|
||||
|
||||
// add relationship between all the testCases that are created against a table with
|
||||
// native
|
||||
// test suite.
|
||||
for (TestCase testCase : testCases) {
|
||||
testSuiteRepository.addRelationship(
|
||||
newExecutableTestSuite.getId(),
|
||||
testCase.getId(),
|
||||
TEST_SUITE,
|
||||
TEST_CASE,
|
||||
Relationship.CONTAINS);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
LOG.warn(String.format("TestSuite %s exists", nativeTestSuiteFqn));
|
||||
}
|
||||
// add relationship between executable TestSuite with Table
|
||||
testSuiteRepository.addRelationship(
|
||||
newExecutableTestSuite.getExecutableEntityReference().getId(),
|
||||
newExecutableTestSuite.getId(),
|
||||
Entity.TABLE,
|
||||
TEST_SUITE,
|
||||
Relationship.CONTAINS);
|
||||
|
||||
// add relationship between all the testCases that are created against a table with native
|
||||
// test suite.
|
||||
for (TestCase testCase : testCases) {
|
||||
testSuiteRepository.addRelationship(
|
||||
newExecutableTestSuite.getId(),
|
||||
testCase.getId(),
|
||||
TEST_SUITE,
|
||||
TEST_CASE,
|
||||
Relationship.CONTAINS);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user