1
0
mirror of synced 2025-12-25 02:09:19 -05:00

Bulk load CDK: switch to passing path around in integration tests (#46978)

This commit is contained in:
Edward Gao
2024-10-22 08:56:49 -07:00
committed by GitHub
parent 9cc083df75
commit 32691add91
19 changed files with 83 additions and 60 deletions

View File

@@ -11,7 +11,8 @@ import org.junit.jupiter.api.Test
class DevNullBasicFunctionalityIntegrationTest :
BasicFunctionalityIntegrationTest(
DevNullTestUtils.loggingConfig,
DevNullTestUtils.loggingConfigContents,
DevNullSpecificationOss::class.java,
DevNullDestinationDataDumper,
NoopDestinationCleaner,
NoopExpectedRecordMapper,

View File

@@ -15,14 +15,14 @@ class DevNullCheckIntegrationTest :
DevNullSpecificationOss::class.java,
successConfigFilenames =
listOf(
CheckTestConfig(DevNullTestUtils.LOGGING_CONFIG_PATH),
CheckTestConfig(DevNullTestUtils.loggingConfigPath),
),
failConfigFilenamesAndFailureReasons =
mapOf(
// cloud doesn't support logging mode, so this should fail
// when trying to parse the config
CheckTestConfig(
DevNullTestUtils.LOGGING_CONFIG_PATH,
DevNullTestUtils.loggingConfigPath,
setOf(FeatureFlag.AIRBYTE_CLOUD_DEPLOYMENT)
) to Pattern.compile("Value 'LOGGING' is not defined in the schema")
),

View File

@@ -23,10 +23,11 @@ object DevNullTestUtils {
* most real destinations will put their configs in GSM,
* so their paths would be `secrets/blah.json`.
*/
const val LOGGING_CONFIG_PATH = "test_configs/logging.json"
val loggingConfigPath: Path = Path.of("test_configs/logging.json")
val loggingConfigContents: String = Files.readString(loggingConfigPath, Charsets.UTF_8)
val loggingConfig: DevNullSpecification =
ValidatedJsonUtils.parseOne(
DevNullSpecificationOss::class.java,
Files.readString(Path.of(LOGGING_CONFIG_PATH)),
Files.readString(loggingConfigPath),
)
}