-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oracle & MongoDb destinations : Enable DAT tests (#11965)
* add Boolean, Number, DateTimeWithTZ compare methods * Improve value comparison * Compare inherit objects element by element * Move comparison methods to a new class not to overload the test class. Basic - old implementation which provides backward compatibility of this PR. Advanced - comparator required for destinations with enabled DAT tests. * format * Move common method to ComparatorUtils. + Review update * format * review * review * enable DAT tests for destination-oracle * mark resolveIdentifier method as deprecated * enable DAT tests for destination-mongodb * remove size objects validation. We iterate expected elements and compare it with actualObject elements. Expected might have empty elements and they are equal missing element in the actual Object. Also, actualObject might contain additional elements which is not an exception.
- Loading branch information
1 parent
57d059f
commit 0004cfa
Showing
4 changed files
with
90 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...integration/java/io/airbyte/integrations/destination/oracle/OracleTestDataComparator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.airbyte.integrations.destination.oracle; | ||
|
||
import io.airbyte.integrations.destination.ExtendedNameTransformer; | ||
import io.airbyte.integrations.standardtest.destination.comparator.AdvancedTestDataComparator; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class OracleTestDataComparator extends AdvancedTestDataComparator { | ||
|
||
private final ExtendedNameTransformer namingResolver = new OracleNameTransformer(); | ||
|
||
@Override | ||
protected List<String> resolveIdentifier(final String identifier) { | ||
final List<String> result = new ArrayList<>(); | ||
final String resolved = namingResolver.getIdentifier(identifier); | ||
result.add(identifier); | ||
result.add(resolved); | ||
if (!resolved.startsWith("\"")) { | ||
result.add(resolved.toLowerCase()); | ||
result.add(resolved.toUpperCase()); | ||
} | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters