load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")

oncall("secure_pipes")

cpp_library(
    name = "mocks",
    headers = [
        "Mocks.h",
    ],
    exported_deps = [
        "//fizz/compression:certificate_compressor",
        "//folly/portability:gmock",
    ],
)

cpp_unittest(
    name = "cert_decompression_manager_test",
    srcs = [
        "CertDecompressionManagerTest.cpp",
    ],
    deps = [
        ":mocks",
        "//fizz/compression:cert_decompression_manager",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "brotli_certificate_compressor_test",
    srcs = [
        "BrotliCertificateCompressorTest.cpp",
    ],
    deps = [
        "//fizz/compression:brotli_certificate_compressor",
        "//fizz/compression:brotli_certificate_decompressor",
        "//fizz/crypto:utils",
        "//fizz/protocol/test:cert_util",
        "//fizz/protocol/test:matchers",
        "//fizz/record:record",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "zlib_certificate_compressor_test",
    srcs = [
        "ZlibCertificateCompressorTest.cpp",
    ],
    deps = [
        "//fizz/compression:zlib_certificate_compressor",
        "//fizz/compression:zlib_certificate_decompressor",
        "//fizz/protocol/test:cert_util",
        "//fizz/protocol/test:matchers",
        "//fizz/record:record",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "zstd_certificate_compressor_test",
    srcs = [
        "ZstdCertificateCompressorTest.cpp",
    ],
    deps = [
        "//fizz/compression:zstd_certificate_compressor",
        "//fizz/compression:zstd_certificate_decompressor",
        "//fizz/crypto:utils",
        "//fizz/protocol/test:cert_util",
        "//fizz/protocol/test:matchers",
        "//fizz/record:record",
        "//folly/portability:gtest",
    ],
)
