content: [package]
  name = "tests_integration"
  version.workspace = true
  edition.workspace = true
  rust-version.workspace = true
  
  [lints]
  workspace = true
  
  [lib]
  doctest = false
  
  [[bin]]
  name = "performance_test"
  required-features = ["performance_test"]
  
  [[test]]
  name = "config_server"
  path = "tests/config_server.rs"
  required-features = ["integration_test"]
  
  [[test]]
  name = "digid_issuance"
  path = "tests/digid_issuance.rs"
  required-features = ["digid_test"]
  
  [[test]]
  name = "disclosure"
  path = "tests/disclosure.rs"
  required-features = ["integration_test"]
  
  [[test]]
  name = "issuance"
  path = "tests/issuance.rs"
  required-features = ["integration_test"]
  
  [[test]]
  name = "locking"
  path = "tests/locking.rs"
  required-features = ["integration_test"]
  
  [[test]]
  name = "pin_change"
  path = "tests/pin_change.rs"
  required-features = ["integration_test"]
  
  [[test]]
  name = "registration"
  path = "tests/registration.rs"
  required-features = ["integration_test"]
  
  [[test]]
  name = "update_policy_server"
  path = "tests/update_policy_server.rs"
  required-features = ["integration_test"]
  
  [features]
  # Allow the disclosure return URL and its prefix to use http://
  allow_insecure_url = ["openid4vc?/allow_insecure_url"]
  # Initialize global logging using tracing-subscriber
  logging = ["dep:tracing", "dep:tracing-subscriber"]
  # Include the common submodule, which includes code all integration tests use.
  test_common = [
      "crypto",
      "hsm",
      "logging",
      "rustls",
      "dep:android_attest",
      "dep:apple_app_attest",
      "dep:attestation_data",
      "dep:axum",
      "dep:axum-server",
      "dep:chrono",
      "dep:configuration_server",
      "dep:ctor",
      "dep:dcql",
      "dep:gba_hc_converter",
      "dep:http_utils",
      "dep:indexmap",
      "dep:issuance_server",
      "dep:openid4vc",
      "dep:openid4vc_server",
      "dep:p256",
      "dep:pid_issuer",
      "dep:platform_support",
      "dep:reqwest",
      "dep:sea-orm",
      "dep:semver",
      "dep:serde_json",
      "dep:server_utils",
      "dep:tempfile",
      "dep:tokio",
      "dep:update_policy_server",
      "dep:url",
      "dep:verification_server",
      "dep:wallet",
      "dep:utils",
      "dep:wallet_configuration",
      "dep:wallet_provider",
      "dep:wallet_provider_persistence",
      "dep:wallet_provider_service",
      "dep:wscd",
  ]
  # Include the fake_digid submodule
  fake_digid = ["dep:http_utils", "dep:reqwest", "dep:url", "dep:wallet_configuration"]
  # Include and run test that depend on an external PostgreSQL database
  db_test = [
      "pid_issuer?/db_test",
      "wallet_provider_persistence?/db_test",
      "wallet_provider_service?/db_test",
      "verification_server?/db_test",
  ]
  # Include and run test that depend on a configured HSM
  hsm_test = ["wallet_provider?/hsm_test"]
  # Feature used for enabling all integration tests
  integration_test = [
      "allow_insecure_url",
      "test_common",
      "db_test",
      "hsm_test",
      "dep:assert_matches",
      "dep:jsonwebtoken",
      "dep:p256",
      "dep:rand_core",
      "dep:regex",
      "dep:rstest",
      "dep:serde_urlencoded",
      "dep:serial_test",
      "dep:tokio",
      "tokio/macros",
      "tokio/sync",
  ]
  # Optional feature for running integration tests that depend on the DigiD connector
  digid_test = [
      "fake_digid",
      "test_common",
      "dep:gba_hc_converter",
      "dep:ring",
      "dep:rustls-pki-types",
      "dep:serial_test",
  ]
  # Should be enabled when building the performance_test binary
  performance_test = [
      "logging",
      "fake_digid",
      "dep:ctor",
      "dep:apple_app_attest",
      "dep:indexmap",
      "dep:dcql",
      "dep:reqwest",
      "dep:tokio",
      "dep:tracing",
      "dep:url",
      "dep:openid4vc",
      "dep:openid4vc_server",
      "dep:pid_issuer",
      "dep:platform_support",
      "dep:serde_urlencoded",
      "dep:tempfile",
      "dep:wallet",
      "dep:utils",
      "dep:server_utils",
      "dep:verification_server",
      "dep:dotenvy",
      "platform_support/mock_attested_key_apple_ca",
  ]
  
  [dependencies]
  assert_matches = { workspace = true, optional = true }
  axum = { workspace = true, optional = true, features = ["http1", "json", "tokio"] }
  axum-server = { workspace = true, optional = true, features = ["tls-rustls-no-provider"] }
  ctor = { workspace = true, optional = true }
  chrono = { workspace = true, optional = true }
  http = { workspace = true, optional = true }
  indexmap = { workspace = true, optional = true }
  jsonwebtoken = { workspace = true, optional = true, features = ["use_pem"] }
  reqwest = { workspace = true, optional = true, features = ["rustls-tls-webpki-roots"] }
  sea-orm = { workspace = true, optional = true, features = [
      "sqlx-postgres",
      "runtime-tokio-rustls",
      "macros",
      "with-uuid",
      "debug-print",
  ] }
  semver = { workspace = true, optional = true }
  serde_json = { workspace = true, optional = true }
  p256 = { workspace = true, optional = true, features = ["pkcs8"] }
  rand_core = { workspace = true, optional = true }
  regex = { workspace = true, optional = true }
  ring = { workspace = true, optional = true }
  rstest = { workspace = true, optional = true }
  rustls = { workspace = true, optional = true, features = ["ring"] }
  rustls-pki-types = { workspace = true, optional = true }
  serde_urlencoded = { workspace = true, optional = true }
  serial_test = { workspace = true, optional = true }
  tempfile = { workspace = true, optional = true }
  tokio = { workspace = true, optional = true, features = ["rt", "time", "parking_lot"] }
  tracing = { workspace = true, optional = true }
  tracing-subscriber = { workspace = true, optional = true, features = [
      "std",
      "fmt",
      "tracing-log",
      "smallvec",
      "parking_lot",
      "env-filter",
      "ansi",
  ] }
  url = { workspace = true, optional = true }
  
  android_attest = { path = "../lib/android_attest", optional = true }
  apple_app_attest = { path = "../lib/apple_app_attest", optional = true, features = ["mock"] }
  attestation_data = { path = "../lib/attestation_data", optional = true, features = [
      "example_credential_payloads",
      "mock",
      "test_credential",
  ] }
  configuration_server = { path = "../configuration_server", optional = true }
  crypto = { path = "../lib/crypto", optional = true }
  dcql = { path = "../lib/dcql", optional = true, features = ["mock"] }
  gba_hc_converter = { path = "../gba_hc_converter", optional = true }
  hsm = { path = "../lib/hsm", optional = true, features = ["test"] }
  http_utils = { path = "../lib/http_utils", optional = true, features = ["client", "server"] }
  issuance_server = { path = "../wallet_server/issuance_server", optional = true }
  jwt.path = "../lib/jwt"
  openid4vc = { path = "../lib/openid4vc", optional = true }
  openid4vc_server = { path = "../lib/openid4vc_server", optional = true, features = ["issuance", "disclosure"] }
  wscd = { path = "../lib/wscd", optional = true, features = ["mock"] }
  pid_issuer = { path = "../wallet_server/pid_issuer", optional = true, features = ["mock"] }
  platform_support = { path = "../wallet/platform_support", optional = true, features = ["mock"] }
  server_utils = { path = "../wallet_server/server_utils", optional = true, features = [] }
  update_policy_server = { path = "../update_policy/server", optional = true }
  verification_server = { path = "../wallet_server/verification_server", optional = true, features = [] }
  wallet = { path = "../wallet", optional = true, features = ["test"] }
  utils = { path = "../lib/utils", optional = true }
  wallet_configuration = { path = "../wallet/configuration", optional = true }
  wallet_provider = { path = "../wallet_provider", optional = true }
  wallet_provider_persistence = { path = "../wallet_provider/persistence", optional = true }
  wallet_provider_service = { path = "../wallet_provider/service", optional = true, features = ["mock"] }
  
  [build-dependencies]
  dotenvy = { workspace = true, optional = true }
  
  [dev-dependencies]
  # This enables the automatic running of unit and integration tests for these crates when tests
  # are run from the workspace. The following features are not included in this:
  # * hsm_test
  # * db_test
  android_attest = { path = "../lib/android_attest", features = ["serialize_key_attestation"] }
  issuance_server = { path = "../wallet_server/issuance_server" }
  openid4vc = { path = "../lib/openid4vc", features = ["integration"] }
  pid_issuer = { path = "../wallet_server/pid_issuer" }
  platform_support = { path = "../wallet/platform_support", features = ["persistent_mock_attested_key"] }
  sd_jwt = { path = "../lib/sd_jwt", features = ["examples", "test"] }
  server_utils = { path = "../wallet_server/server_utils", features = ["parsed_key_pair_conversion"] }
  token_status_list = { path = "../lib/token_status_list", features = ["axum"] }
  verification_server = { path = "../wallet_server/verification_server", features = ["test"] }
  