load(
"@prelude-si//:macros.bzl",
"rust_library",
"rust_test",
)
rust_library(
name = "si-layer-cache",
deps = [
"//lib/nats-std:nats-std",
"//lib/si-aws-config:si-aws-config",
"//lib/si-data-nats:si-data-nats",
"//lib/si-data-pg:si-data-pg",
"//lib/si-events-rs:si-events",
"//lib/si-id:si-id",
"//lib/si-runtime-rs:si-runtime",
"//lib/si-std:si-std",
"//lib/si-tls:si-tls",
"//lib/telemetry-rs:telemetry",
"//lib/telemetry-utils-rs:telemetry-utils",
"//third-party/rust:async-trait",
"//third-party/rust:aws-config",
"//third-party/rust:aws-credential-types",
"//third-party/rust:aws-sdk-s3",
"//third-party/rust:blake3",
"//third-party/rust:bytes",
"//third-party/rust:chrono",
"//third-party/rust:foyer",
"//third-party/rust:fs4",
"//third-party/rust:futures",
"//third-party/rust:http",
"//third-party/rust:miniz_oxide",
"//third-party/rust:mixtrics",
"//third-party/rust:postcard",
"//third-party/rust:rand",
"//third-party/rust:refinery",
"//third-party/rust:remain",
"//third-party/rust:serde",
"//third-party/rust:serde_json",
"//third-party/rust:strum",
"//third-party/rust:sysinfo",
"//third-party/rust:tempfile",
"//third-party/rust:thiserror",
"//third-party/rust:tokio",
"//third-party/rust:tokio-stream",
"//third-party/rust:tokio-util",
"//third-party/rust:tracing",
"//third-party/rust:ulid",
],
srcs = glob([
"src/**/*.rs",
"src/migrations/*.sql",
]),
env = {
"CARGO_MANIFEST_DIR": ".",
},
extra_test_targets = [":test-integration"],
)
rust_test(
name = "test-integration",
deps = [
"//lib/buck2-resources:buck2-resources",
"//lib/si-data-nats:si-data-nats",
"//lib/si-data-pg:si-data-pg",
"//lib/si-events-rs:si-events",
"//lib/si-runtime-rs:si-runtime",
"//lib/si-tls:si-tls",
"//third-party/rust:blake3",
"//third-party/rust:bytes",
"//third-party/rust:chrono",
"//third-party/rust:futures",
"//third-party/rust:postcard",
"//third-party/rust:rand",
"//third-party/rust:serde_json",
"//third-party/rust:tempfile",
"//third-party/rust:tokio",
"//third-party/rust:tokio-stream",
"//third-party/rust:tokio-util",
"//third-party/rust:ulid",
":si-layer-cache",
],
srcs = glob([
"tests/**/*.rs",
"src/migrations/*.sql",
]),
resources = {
"dev.postgres.root.crt": "//config/keys:dev.postgres.root.crt",
},
crate_root = "tests/integration.rs",
env = {
"CARGO_PKG_NAME": "integration",
"RUSTC_BOOTSTRAP": "1",
"CI": "buildkite",
},
)