Bulk load CDK: switch to passing path around in integration tests (#46978)
This commit is contained in:
@@ -11,7 +11,8 @@ import org.junit.jupiter.api.Test
|
||||
|
||||
class DevNullBasicFunctionalityIntegrationTest :
|
||||
BasicFunctionalityIntegrationTest(
|
||||
DevNullTestUtils.loggingConfig,
|
||||
DevNullTestUtils.loggingConfigContents,
|
||||
DevNullSpecificationOss::class.java,
|
||||
DevNullDestinationDataDumper,
|
||||
NoopDestinationCleaner,
|
||||
NoopExpectedRecordMapper,
|
||||
|
||||
@@ -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")
|
||||
),
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user