|
14 | 14 | import io.airbyte.commons.io.IOs;
|
15 | 15 | import io.airbyte.commons.jackson.MoreMappers;
|
16 | 16 | import io.airbyte.commons.json.Jsons;
|
| 17 | +import io.airbyte.commons.resources.MoreResources; |
17 | 18 | import io.airbyte.db.jdbc.JdbcDatabase;
|
18 | 19 | import io.airbyte.integrations.base.AirbyteMessageConsumer;
|
19 | 20 | import io.airbyte.integrations.base.Destination;
|
20 |
| -import io.airbyte.protocol.models.AirbyteMessage; |
21 |
| -import io.airbyte.protocol.models.AirbyteRecordMessage; |
22 |
| -import io.airbyte.protocol.models.CatalogHelpers; |
23 |
| -import io.airbyte.protocol.models.ConfiguredAirbyteCatalog; |
24 |
| -import io.airbyte.protocol.models.DestinationSyncMode; |
25 |
| -import io.airbyte.protocol.models.Field; |
26 |
| -import io.airbyte.protocol.models.JsonSchemaPrimitive; |
| 21 | +import io.airbyte.protocol.models.*; |
27 | 22 | import org.junit.jupiter.api.DisplayName;
|
28 | 23 | import org.junit.jupiter.api.Test;
|
29 | 24 |
|
@@ -81,8 +76,7 @@ public void testCleanupStageOnFailure() throws Exception {
|
81 | 76 | JdbcDatabase mockDb = mock(JdbcDatabase.class);
|
82 | 77 | SnowflakeStagingSqlOperations sqlOperations = mock(SnowflakeStagingSqlOperations.class);
|
83 | 78 | final var testMessages = generateTestMessages();
|
84 |
| - final JsonNode config = Jsons.deserialize(IOs.readFile(Path.of("secrets/insert_config.json"))); |
85 |
| - |
| 79 | + final JsonNode config = Jsons.deserialize(MoreResources.readResource("insert_config.json"), JsonNode.class); |
86 | 80 | AirbyteMessageConsumer airbyteMessageConsumer = new SnowflakeInternalStagingConsumerFactory()
|
87 | 81 | .create(Destination::defaultOutputRecordCollector, mockDb,
|
88 | 82 | sqlOperations, new SnowflakeSQLNameTransformer(), config, getCatalog());
|
|
0 commit comments