/*
 * Copyright 2023 Aiven Oy
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

dependencies {
    integrationTestImplementation "org.apache.kafka:kafka-clients:$kafkaVersion"
    integrationTestImplementation "org.apache.kafka:kafka-server-common:$kafkaVersion"
    integrationTestImplementation "org.apache.kafka:kafka-storage:$kafkaVersion"
    integrationTestImplementation "org.apache.kafka:kafka-storage-api:$kafkaVersion"

    integrationTestImplementation "commons-io:commons-io:$apacheCommonsIOVersion"
    integrationTestImplementation("software.amazon.awssdk:s3:$awsSdkVersion") {
        exclude group: "org.slf4j"
    }
    integrationTestImplementation ("com.google.cloud:google-cloud-storage:$gcpSdkVersion") {
        exclude group: "org.slf4j"
    }

    integrationTestImplementation "org.testcontainers:junit-jupiter:$testcontainersVersion"
    integrationTestImplementation "org.testcontainers:kafka:$testcontainersVersion"

    integrationTestImplementation "io.aiven:testcontainers-fake-gcs-server:$testcontainersFakeGcsServerVersion"

    integrationTestImplementation platform("com.azure:azure-sdk-bom:$azureSdkVersion")
    integrationTestImplementation "com.azure:azure-storage-blob"

    integrationTestRuntimeOnly "org.slf4j:slf4j-log4j12:$slf4jVersion"
}

tasks.named('test') {
    // Use junit platform for unit tests.
    useJUnitPlatform()
    testLogging {
        events 'passed', 'skipped', 'failed'
        showStandardStreams = true
        showExceptions = true
        showStackTraces = true
        showCauses = true
        exceptionFormat "full"
    }
}
