load("@fbcode//quic:defs.bzl", "mvfst_cpp_test", "mvfst_fbcode_only")
load("@fbsource//tools/build_defs/testinfra:network_access_utils.bzl", "network_access_utils")

oncall("traffic_protocols")

mvfst_cpp_test(
    name = "FizzTransportParametersTest",
    srcs = [
        "FizzTransportParametersTest.cpp",
    ],
    network_access = network_access_utils.none(),
    deps = [
        "fbsource//xplat/folly/portability:gmock",
        "fbsource//xplat/folly/portability:gtest",
        "//fizz/record/test:extension_tests_base",
        "//quic:constants",
        "//quic/common/test:test_utils",
        "//quic/fizz/handshake:fizz_handshake",
    ],
)

mvfst_cpp_test(
    name = "ContiguousAeadTest",
    srcs = [
        "ContiguousAeadTest.cpp",
    ],
    network_access = network_access_utils.none(),
    deps = [
        "//fizz/protocol:types",
        "//folly/portability:gtest",
        "//folly/ssl:openssl_ptr_types",
        "//quic/fizz/handshake:contiguous_aead",
        "//quic/fizz/handshake:fizz_bridge",
        "//quic/fizz/handshake:fizz_handshake",
    ],
)

mvfst_fbcode_only(
    mvfst_cpp_test,
    name = "HaberdasheryAeadTest",
    srcs = [
        "HaberdasheryAeadTest.cpp",
    ],
    compatible_with = [
        "ovr_config//os:linux-arm64",
        "ovr_config//os:linux-x86_64",
    ],
    network_access = network_access_utils.none(),
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//fizz/protocol:types",
        "//folly/portability:gtest",
        "//quic/fizz/handshake:fizz_bridge",
        "//quic/fizz/handshake:fizz_handshake",
        "//quic/fizz/handshake:haberdashery_aead",
    ],
)

mvfst_cpp_test(
    name = "FizzCryptoFactoryTest",
    srcs = [
        "FizzCryptoFactoryTest.cpp",
    ],
    network_access = network_access_utils.none(),
    deps = [
        "fbsource//xplat/folly/portability:gmock",
        "fbsource//xplat/folly/portability:gtest",
        "//fizz/crypto/aead/test:mocks",
        "//quic/common:string_utils",
        "//quic/common/test:test_utils",
        "//quic/fizz/handshake:fizz_handshake",
        "//quic/handshake/test:mocks",
    ],
)

mvfst_cpp_test(
    name = "FizzPacketNumberCipherTest",
    srcs = [
        "FizzPacketNumberCipherTest.cpp",
    ],
    network_access = network_access_utils.none(),
    supports_static_listing = False,
    deps = [
        "fbsource//xplat/folly/portability:gtest",
        "//fizz/record:record",
        "//quic/common:string_utils",
        "//quic/fizz/handshake:fizz_handshake",
        "//quic/fizz/handshake:fizz_packet_number_cipher",
    ],
)
