[wip] cli capability parity
Some checks failed
CI / Rustfmt (push) Successful in 23s
CI / Cargo Audit & Deny (push) Successful in 30s
CI / Web Blocking Checks (push) Successful in 48s
CI / Security Blocking Checks (push) Successful in 8s
CI / Clippy (push) Failing after 1m55s
CI / Web Advisory Checks (push) Successful in 35s
CI / Security Advisory Checks (push) Successful in 37s
CI / Tests (push) Successful in 8m5s
Some checks failed
CI / Rustfmt (push) Successful in 23s
CI / Cargo Audit & Deny (push) Successful in 30s
CI / Web Blocking Checks (push) Successful in 48s
CI / Security Blocking Checks (push) Successful in 8s
CI / Clippy (push) Failing after 1m55s
CI / Web Advisory Checks (push) Successful in 35s
CI / Security Advisory Checks (push) Successful in 37s
CI / Tests (push) Successful in 8m5s
This commit is contained in:
@@ -55,6 +55,8 @@ utoipa = { workspace = true }
|
||||
|
||||
# JWT
|
||||
jsonwebtoken = { workspace = true }
|
||||
hmac = { workspace = true }
|
||||
signature = { workspace = true }
|
||||
|
||||
# Encryption
|
||||
argon2 = { workspace = true }
|
||||
|
||||
193
crates/common/src/auth/crypto_provider.rs
Normal file
193
crates/common/src/auth/crypto_provider.rs
Normal file
@@ -0,0 +1,193 @@
|
||||
//! HMAC-only CryptoProvider for jsonwebtoken v10.
|
||||
//!
|
||||
//! The `jsonwebtoken` crate v10 requires a `CryptoProvider` to be installed
|
||||
//! before any signing/verification operations. The built-in `rust_crypto`
|
||||
//! feature pulls in the `rsa` crate, which has an unpatched advisory
|
||||
//! (RUSTSEC-2023-0071 — Marvin Attack timing sidechannel).
|
||||
//!
|
||||
//! Since Attune only uses HMAC-SHA2 (HS256/HS384/HS512) for JWT signing,
|
||||
//! this module provides a minimal CryptoProvider that supports only those
|
||||
//! algorithms, avoiding the `rsa` dependency entirely.
|
||||
//!
|
||||
//! Call [`install()`] once at process startup (before any JWT operations).
|
||||
|
||||
use hmac::{Hmac, Mac};
|
||||
use jsonwebtoken::crypto::{CryptoProvider, JwkUtils, JwtSigner, JwtVerifier};
|
||||
use jsonwebtoken::{Algorithm, DecodingKey, EncodingKey};
|
||||
use sha2::{Sha256, Sha384, Sha512};
|
||||
use signature::{Signer, Verifier};
|
||||
use std::sync::Once;
|
||||
|
||||
type HmacSha256 = Hmac<Sha256>;
|
||||
type HmacSha384 = Hmac<Sha384>;
|
||||
type HmacSha512 = Hmac<Sha512>;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Signers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
macro_rules! define_hmac_signer {
|
||||
($name:ident, $alg:expr, $hmac_type:ty) => {
|
||||
struct $name($hmac_type);
|
||||
|
||||
impl $name {
|
||||
fn new(key: &EncodingKey) -> jsonwebtoken::errors::Result<Self> {
|
||||
let inner = <$hmac_type>::new_from_slice(key.try_get_hmac_secret()?)
|
||||
.map_err(|_| jsonwebtoken::errors::ErrorKind::InvalidKeyFormat)?;
|
||||
Ok(Self(inner))
|
||||
}
|
||||
}
|
||||
|
||||
impl Signer<Vec<u8>> for $name {
|
||||
fn try_sign(&self, msg: &[u8]) -> std::result::Result<Vec<u8>, signature::Error> {
|
||||
let mut mac = self.0.clone();
|
||||
mac.reset();
|
||||
mac.update(msg);
|
||||
Ok(mac.finalize().into_bytes().to_vec())
|
||||
}
|
||||
}
|
||||
|
||||
impl JwtSigner for $name {
|
||||
fn algorithm(&self) -> Algorithm {
|
||||
$alg
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
define_hmac_signer!(Hs256Signer, Algorithm::HS256, HmacSha256);
|
||||
define_hmac_signer!(Hs384Signer, Algorithm::HS384, HmacSha384);
|
||||
define_hmac_signer!(Hs512Signer, Algorithm::HS512, HmacSha512);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Verifiers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
macro_rules! define_hmac_verifier {
|
||||
($name:ident, $alg:expr, $hmac_type:ty) => {
|
||||
struct $name($hmac_type);
|
||||
|
||||
impl $name {
|
||||
fn new(key: &DecodingKey) -> jsonwebtoken::errors::Result<Self> {
|
||||
let inner = <$hmac_type>::new_from_slice(key.try_get_hmac_secret()?)
|
||||
.map_err(|_| jsonwebtoken::errors::ErrorKind::InvalidKeyFormat)?;
|
||||
Ok(Self(inner))
|
||||
}
|
||||
}
|
||||
|
||||
impl Verifier<Vec<u8>> for $name {
|
||||
fn verify(
|
||||
&self,
|
||||
msg: &[u8],
|
||||
sig: &Vec<u8>,
|
||||
) -> std::result::Result<(), signature::Error> {
|
||||
let mut mac = self.0.clone();
|
||||
mac.reset();
|
||||
mac.update(msg);
|
||||
mac.verify_slice(sig).map_err(signature::Error::from_source)
|
||||
}
|
||||
}
|
||||
|
||||
impl JwtVerifier for $name {
|
||||
fn algorithm(&self) -> Algorithm {
|
||||
$alg
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
define_hmac_verifier!(Hs256Verifier, Algorithm::HS256, HmacSha256);
|
||||
define_hmac_verifier!(Hs384Verifier, Algorithm::HS384, HmacSha384);
|
||||
define_hmac_verifier!(Hs512Verifier, Algorithm::HS512, HmacSha512);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Provider
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
fn hmac_signer_factory(
|
||||
algorithm: &Algorithm,
|
||||
key: &EncodingKey,
|
||||
) -> jsonwebtoken::errors::Result<Box<dyn JwtSigner>> {
|
||||
match algorithm {
|
||||
Algorithm::HS256 => Ok(Box::new(Hs256Signer::new(key)?)),
|
||||
Algorithm::HS384 => Ok(Box::new(Hs384Signer::new(key)?)),
|
||||
Algorithm::HS512 => Ok(Box::new(Hs512Signer::new(key)?)),
|
||||
_other => Err(jsonwebtoken::errors::ErrorKind::InvalidAlgorithm.into()),
|
||||
}
|
||||
}
|
||||
|
||||
fn hmac_verifier_factory(
|
||||
algorithm: &Algorithm,
|
||||
key: &DecodingKey,
|
||||
) -> jsonwebtoken::errors::Result<Box<dyn JwtVerifier>> {
|
||||
match algorithm {
|
||||
Algorithm::HS256 => Ok(Box::new(Hs256Verifier::new(key)?)),
|
||||
Algorithm::HS384 => Ok(Box::new(Hs384Verifier::new(key)?)),
|
||||
Algorithm::HS512 => Ok(Box::new(Hs512Verifier::new(key)?)),
|
||||
_other => Err(jsonwebtoken::errors::ErrorKind::InvalidAlgorithm.into()),
|
||||
}
|
||||
}
|
||||
|
||||
/// HMAC-only [`CryptoProvider`]. Supports HS256, HS384, HS512 only.
|
||||
/// JWK utility functions (RSA/EC key extraction) are stubbed out since
|
||||
/// Attune never uses asymmetric JWKs.
|
||||
static HMAC_PROVIDER: CryptoProvider = CryptoProvider {
|
||||
signer_factory: hmac_signer_factory,
|
||||
verifier_factory: hmac_verifier_factory,
|
||||
jwk_utils: JwkUtils::new_unimplemented(),
|
||||
};
|
||||
|
||||
static INIT: Once = Once::new();
|
||||
|
||||
/// Install the HMAC-only crypto provider for jsonwebtoken.
|
||||
///
|
||||
/// Safe to call multiple times — only the first call takes effect.
|
||||
/// Must be called before any JWT encode/decode operations.
|
||||
pub fn install() {
|
||||
INIT.call_once(|| {
|
||||
// install_default returns Err if already installed (e.g., by a feature-based
|
||||
// provider). That's fine — we only care that *some* provider is present.
|
||||
let _ = HMAC_PROVIDER.install_default();
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_install_idempotent() {
|
||||
install();
|
||||
install(); // second call should not panic
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hmac_sign_and_verify() {
|
||||
install();
|
||||
|
||||
let secret = b"test-secret-key";
|
||||
let encoding_key = EncodingKey::from_secret(secret);
|
||||
let decoding_key = DecodingKey::from_secret(secret);
|
||||
|
||||
let message = b"hello world";
|
||||
|
||||
let signer =
|
||||
hmac_signer_factory(&Algorithm::HS256, &encoding_key).expect("should create signer");
|
||||
let sig = signer.try_sign(message).expect("should sign");
|
||||
|
||||
let verifier = hmac_verifier_factory(&Algorithm::HS256, &decoding_key)
|
||||
.expect("should create verifier");
|
||||
verifier
|
||||
.verify(message, &sig)
|
||||
.expect("signature should verify");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_unsupported_algorithm_rejected() {
|
||||
install();
|
||||
|
||||
let key = EncodingKey::from_secret(b"key");
|
||||
let result = hmac_signer_factory(&Algorithm::RS256, &key);
|
||||
assert!(result.is_err());
|
||||
}
|
||||
}
|
||||
@@ -248,8 +248,10 @@ pub fn extract_token_from_header(auth_header: &str) -> Option<&str> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::auth::crypto_provider;
|
||||
|
||||
fn test_config() -> JwtConfig {
|
||||
crypto_provider::install();
|
||||
JwtConfig {
|
||||
secret: "test_secret_key_for_testing".to_string(),
|
||||
access_token_expiration: 3600,
|
||||
@@ -260,6 +262,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_generate_and_validate_access_token() {
|
||||
let config = test_config();
|
||||
|
||||
let token =
|
||||
generate_access_token(123, "testuser", &config).expect("Failed to generate token");
|
||||
|
||||
@@ -293,6 +296,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_token_with_wrong_secret() {
|
||||
let config = test_config();
|
||||
|
||||
let token = generate_access_token(789, "user", &config).expect("Failed to generate token");
|
||||
|
||||
let wrong_config = JwtConfig {
|
||||
@@ -306,6 +310,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_expired_token() {
|
||||
crypto_provider::install();
|
||||
let now = Utc::now().timestamp();
|
||||
let expired_claims = Claims {
|
||||
sub: "999".to_string(),
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
//! that are used by the API (for all token types), the worker (for execution-scoped
|
||||
//! tokens), and the sensor service (for sensor tokens).
|
||||
|
||||
pub mod crypto_provider;
|
||||
pub mod jwt;
|
||||
|
||||
pub use crypto_provider::install as install_crypto_provider;
|
||||
pub use jwt::{
|
||||
extract_token_from_header, generate_access_token, generate_execution_token,
|
||||
generate_refresh_token, generate_sensor_token, generate_token, validate_token, Claims,
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
//!
|
||||
//! This module provides functions for encrypting and decrypting secret values
|
||||
//! using AES-256-GCM encryption with randomly generated nonces.
|
||||
//!
|
||||
//! ## JSON value encryption
|
||||
//!
|
||||
//! [`encrypt_json`] / [`decrypt_json`] operate on [`serde_json::Value`] values.
|
||||
//! The JSON value is serialised to its compact string form before encryption,
|
||||
//! and the resulting ciphertext is stored as a JSON string (`Value::String`).
|
||||
//! This means the JSONB column always holds a plain JSON string when encrypted,
|
||||
//! and the original structured value is recovered after decryption.
|
||||
|
||||
use crate::{Error, Result};
|
||||
use aes_gcm::{
|
||||
@@ -9,6 +17,7 @@ use aes_gcm::{
|
||||
Aes256Gcm, Key, Nonce,
|
||||
};
|
||||
use base64::{engine::general_purpose::STANDARD as BASE64, Engine};
|
||||
use serde_json::Value as JsonValue;
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
/// Size of the nonce in bytes (96 bits for AES-GCM)
|
||||
@@ -55,6 +64,33 @@ pub fn encrypt(plaintext: &str, encryption_key: &str) -> Result<String> {
|
||||
Ok(BASE64.encode(&result))
|
||||
}
|
||||
|
||||
/// Encrypt a [`JsonValue`] using AES-256-GCM.
|
||||
///
|
||||
/// The value is first serialised to its compact JSON string representation,
|
||||
/// then encrypted with [`encrypt`]. The returned value is a
|
||||
/// [`JsonValue::String`] containing the base64 ciphertext, suitable for
|
||||
/// storage in a JSONB column.
|
||||
pub fn encrypt_json(value: &JsonValue, encryption_key: &str) -> Result<JsonValue> {
|
||||
let plaintext = serde_json::to_string(value)
|
||||
.map_err(|e| Error::encryption(format!("Failed to serialise JSON for encryption: {e}")))?;
|
||||
let ciphertext = encrypt(&plaintext, encryption_key)?;
|
||||
Ok(JsonValue::String(ciphertext))
|
||||
}
|
||||
|
||||
/// Decrypt a [`JsonValue`] that was previously encrypted with [`encrypt_json`].
|
||||
///
|
||||
/// The input must be a [`JsonValue::String`] containing a base64 ciphertext.
|
||||
/// After decryption the JSON string is parsed back into the original
|
||||
/// structured [`JsonValue`].
|
||||
pub fn decrypt_json(value: &JsonValue, encryption_key: &str) -> Result<JsonValue> {
|
||||
let ciphertext = value
|
||||
.as_str()
|
||||
.ok_or_else(|| Error::encryption("Encrypted JSON value must be a string"))?;
|
||||
let plaintext = decrypt(ciphertext, encryption_key)?;
|
||||
serde_json::from_str(&plaintext)
|
||||
.map_err(|e| Error::encryption(format!("Failed to parse decrypted JSON: {e}")))
|
||||
}
|
||||
|
||||
/// Decrypt a ciphertext value using AES-256-GCM
|
||||
///
|
||||
/// The ciphertext should be base64-encoded and contain: nonce || encrypted_data || tag
|
||||
@@ -226,4 +262,61 @@ mod tests {
|
||||
assert_eq!(key1, key2);
|
||||
assert_eq!(key1.len(), 32); // 256 bits
|
||||
}
|
||||
|
||||
// ── JSON encryption tests ──────────────────────────────────────
|
||||
|
||||
#[test]
|
||||
fn test_encrypt_decrypt_json_string() {
|
||||
let value = serde_json::json!("my_secret_token");
|
||||
let encrypted = encrypt_json(&value, TEST_KEY).expect("encrypt_json should succeed");
|
||||
assert!(encrypted.is_string(), "encrypted JSON should be a string");
|
||||
let decrypted = decrypt_json(&encrypted, TEST_KEY).expect("decrypt_json should succeed");
|
||||
assert_eq!(value, decrypted);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_encrypt_decrypt_json_object() {
|
||||
let value = serde_json::json!({"user": "admin", "password": "s3cret", "port": 5432});
|
||||
let encrypted = encrypt_json(&value, TEST_KEY).expect("encrypt_json should succeed");
|
||||
let decrypted = decrypt_json(&encrypted, TEST_KEY).expect("decrypt_json should succeed");
|
||||
assert_eq!(value, decrypted);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_encrypt_decrypt_json_array() {
|
||||
let value = serde_json::json!(["token1", "token2", 42, true, null]);
|
||||
let encrypted = encrypt_json(&value, TEST_KEY).expect("encrypt_json should succeed");
|
||||
let decrypted = decrypt_json(&encrypted, TEST_KEY).expect("decrypt_json should succeed");
|
||||
assert_eq!(value, decrypted);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_encrypt_decrypt_json_number() {
|
||||
let value = serde_json::json!(42);
|
||||
let encrypted = encrypt_json(&value, TEST_KEY).unwrap();
|
||||
let decrypted = decrypt_json(&encrypted, TEST_KEY).unwrap();
|
||||
assert_eq!(value, decrypted);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_encrypt_decrypt_json_bool() {
|
||||
let value = serde_json::json!(true);
|
||||
let encrypted = encrypt_json(&value, TEST_KEY).unwrap();
|
||||
let decrypted = decrypt_json(&encrypted, TEST_KEY).unwrap();
|
||||
assert_eq!(value, decrypted);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_decrypt_json_wrong_key_fails() {
|
||||
let value = serde_json::json!({"secret": "data"});
|
||||
let encrypted = encrypt_json(&value, TEST_KEY).unwrap();
|
||||
let wrong = "wrong_key_that_is_also_32_chars_long!!!";
|
||||
assert!(decrypt_json(&encrypted, wrong).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_decrypt_json_non_string_fails() {
|
||||
let not_encrypted = serde_json::json!(42);
|
||||
assert!(decrypt_json(¬_encrypted, TEST_KEY).is_err());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1232,7 +1232,7 @@ pub mod key {
|
||||
pub name: String,
|
||||
pub encrypted: bool,
|
||||
pub encryption_key_hash: Option<String>,
|
||||
pub value: String,
|
||||
pub value: JsonValue,
|
||||
pub created: DateTime<Utc>,
|
||||
pub updated: DateTime<Utc>,
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use crate::models::{key::*, Id, OwnerType};
|
||||
use crate::Result;
|
||||
use serde_json::Value as JsonValue;
|
||||
use sqlx::{Executor, Postgres, QueryBuilder};
|
||||
|
||||
use super::{Create, Delete, FindById, List, Repository, Update};
|
||||
@@ -48,13 +49,13 @@ pub struct CreateKeyInput {
|
||||
pub name: String,
|
||||
pub encrypted: bool,
|
||||
pub encryption_key_hash: Option<String>,
|
||||
pub value: String,
|
||||
pub value: JsonValue,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct UpdateKeyInput {
|
||||
pub name: Option<String>,
|
||||
pub value: Option<String>,
|
||||
pub value: Option<JsonValue>,
|
||||
pub encrypted: Option<bool>,
|
||||
pub encryption_key_hash: Option<String>,
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ use helpers::*;
|
||||
use serde_json::json;
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_action() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -35,6 +36,7 @@ async fn test_create_action() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_action_with_optional_fields() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -71,6 +73,7 @@ async fn test_create_action_with_optional_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_action_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -95,6 +98,7 @@ async fn test_find_action_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_action_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -104,6 +108,7 @@ async fn test_find_action_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_action_by_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -127,6 +132,7 @@ async fn test_find_action_by_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_action_by_ref_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -138,6 +144,7 @@ async fn test_find_action_by_ref_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_actions() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -167,6 +174,7 @@ async fn test_list_actions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_actions_empty() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -176,6 +184,7 @@ async fn test_list_actions_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_action() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -211,6 +220,7 @@ async fn test_update_action() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_action_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -225,6 +235,7 @@ async fn test_update_action_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_action_partial() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -254,6 +265,7 @@ async fn test_update_action_partial() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_action() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -278,6 +290,7 @@ async fn test_delete_action() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_action_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -287,6 +300,7 @@ async fn test_delete_action_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_actions_cascade_delete_with_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -314,6 +328,7 @@ async fn test_actions_cascade_delete_with_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_action_foreign_key_constraint() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -338,6 +353,7 @@ async fn test_action_foreign_key_constraint() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_multiple_actions_same_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -362,6 +378,7 @@ async fn test_multiple_actions_same_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_action_unique_ref_constraint() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -386,6 +403,7 @@ async fn test_action_unique_ref_constraint() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_action_with_json_schemas() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -423,6 +441,7 @@ async fn test_action_with_json_schemas() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_action_timestamps_auto_populated() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -443,6 +462,7 @@ async fn test_action_timestamps_auto_populated() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_action_updated_changes_on_update() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ use serde_json::json;
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_enforcement_minimal() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -93,6 +94,7 @@ async fn test_create_enforcement_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_enforcement_with_event() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -160,6 +162,7 @@ async fn test_create_enforcement_with_event() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_enforcement_with_conditions() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -225,6 +228,7 @@ async fn test_create_enforcement_with_conditions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_enforcement_with_any_condition() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -287,6 +291,7 @@ async fn test_create_enforcement_with_any_condition() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_enforcement_without_rule_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -310,6 +315,7 @@ async fn test_create_enforcement_without_rule_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_enforcement_with_invalid_rule_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -333,6 +339,7 @@ async fn test_create_enforcement_with_invalid_rule_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_enforcement_with_nonexistent_event_succeeds() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -363,6 +370,7 @@ async fn test_create_enforcement_with_nonexistent_event_succeeds() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enforcement_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -424,6 +432,7 @@ async fn test_find_enforcement_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enforcement_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -435,6 +444,7 @@ async fn test_find_enforcement_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_enforcement_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -490,6 +500,7 @@ async fn test_get_enforcement_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_enforcement_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -504,6 +515,7 @@ async fn test_get_enforcement_by_id_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_enforcements_empty() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -513,6 +525,7 @@ async fn test_list_enforcements_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_enforcements() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -584,6 +597,7 @@ async fn test_list_enforcements() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_enforcement_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -649,6 +663,7 @@ async fn test_update_enforcement_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_enforcement_status_transitions() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -727,6 +742,7 @@ async fn test_update_enforcement_status_transitions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_enforcement_payload() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -789,6 +805,7 @@ async fn test_update_enforcement_payload() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_enforcement_both_fields() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -852,6 +869,7 @@ async fn test_update_enforcement_both_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_enforcement_no_changes() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -915,6 +933,7 @@ async fn test_update_enforcement_no_changes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_enforcement_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -935,6 +954,7 @@ async fn test_update_enforcement_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_enforcement() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -995,6 +1015,7 @@ async fn test_delete_enforcement() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_enforcement_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1008,6 +1029,7 @@ async fn test_delete_enforcement_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enforcements_by_rule() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1100,6 +1122,7 @@ async fn test_find_enforcements_by_rule() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enforcements_by_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1189,6 +1212,7 @@ async fn test_find_enforcements_by_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enforcements_by_event() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1273,6 +1297,7 @@ async fn test_find_enforcements_by_event() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_rule_sets_enforcement_rule_to_null() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1338,6 +1363,7 @@ async fn test_delete_rule_sets_enforcement_rule_to_null() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_enforcement_resolved_at_lifecycle() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ use serde_json::json;
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_event_minimal() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -60,6 +61,7 @@ async fn test_create_event_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_event_with_payload() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -101,6 +103,7 @@ async fn test_create_event_with_payload() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_event_with_config() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -136,6 +139,7 @@ async fn test_create_event_with_config() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_event_without_trigger_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -158,6 +162,7 @@ async fn test_create_event_without_trigger_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_event_with_source() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -191,6 +196,7 @@ async fn test_create_event_with_source() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_event_with_invalid_trigger_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -217,6 +223,7 @@ async fn test_create_event_with_invalid_trigger_fails() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_event_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -249,6 +256,7 @@ async fn test_find_event_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_event_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -258,6 +266,7 @@ async fn test_find_event_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_event_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -284,6 +293,7 @@ async fn test_get_event_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_event_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -298,6 +308,7 @@ async fn test_get_event_by_id_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_events_empty() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -307,6 +318,7 @@ async fn test_list_events_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_events() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -345,6 +357,7 @@ async fn test_list_events() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_events_respects_limit() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -368,6 +381,7 @@ async fn test_list_events_respects_limit() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_event() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -396,6 +410,7 @@ async fn test_delete_event() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_event_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -405,6 +420,7 @@ async fn test_delete_event_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_event_enforcement_retains_event_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -480,6 +496,7 @@ async fn test_delete_event_enforcement_retains_event_id() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_events_by_trigger() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -527,6 +544,7 @@ async fn test_find_events_by_trigger() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_events_by_trigger_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -561,6 +579,7 @@ async fn test_find_events_by_trigger_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_events_by_trigger_ref_preserves_after_trigger_deletion() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -602,6 +621,7 @@ async fn test_find_events_by_trigger_ref_preserves_after_trigger_deletion() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_event_created_timestamp_auto_set() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ use serde_json::json;
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_execution_basic() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -61,6 +62,7 @@ async fn test_create_execution_basic() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_execution_without_action() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -86,6 +88,7 @@ async fn test_create_execution_without_action() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_execution_with_all_fields() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -120,6 +123,7 @@ async fn test_create_execution_with_all_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_execution_with_parent() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -177,6 +181,7 @@ async fn test_create_execution_with_parent() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_execution_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -216,6 +221,7 @@ async fn test_find_execution_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_execution_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -227,6 +233,7 @@ async fn test_find_execution_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_executions() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -270,6 +277,7 @@ async fn test_list_executions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_executions_ordered_by_created_desc() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -324,6 +332,7 @@ async fn test_list_executions_ordered_by_created_desc() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_execution_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -368,6 +377,7 @@ async fn test_update_execution_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_execution_result() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -413,6 +423,7 @@ async fn test_update_execution_result() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_execution_executor() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -456,6 +467,7 @@ async fn test_update_execution_executor() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_execution_status_transitions() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -546,6 +558,7 @@ async fn test_update_execution_status_transitions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_execution_failed_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -590,6 +603,7 @@ async fn test_update_execution_failed_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_execution_no_changes() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -633,6 +647,7 @@ async fn test_update_execution_no_changes() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_execution() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -675,6 +690,7 @@ async fn test_delete_execution() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_execution_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -688,6 +704,7 @@ async fn test_delete_execution_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_executions_by_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -743,6 +760,7 @@ async fn test_find_executions_by_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_executions_by_enforcement() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -804,6 +822,7 @@ async fn test_find_executions_by_enforcement() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_parent_child_execution_hierarchy() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -867,6 +886,7 @@ async fn test_parent_child_execution_hierarchy() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_nested_execution_hierarchy() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -945,6 +965,7 @@ async fn test_nested_execution_hierarchy() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_execution_timestamps() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1000,6 +1021,7 @@ async fn test_execution_timestamps() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_execution_config_json() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1047,6 +1069,7 @@ async fn test_execution_config_json() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_execution_result_json() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -1116,7 +1116,7 @@ pub struct KeyFixture {
|
||||
pub name: String,
|
||||
pub encrypted: bool,
|
||||
pub encryption_key_hash: Option<String>,
|
||||
pub value: String,
|
||||
pub value: serde_json::Value,
|
||||
}
|
||||
|
||||
impl KeyFixture {
|
||||
@@ -1136,7 +1136,7 @@ impl KeyFixture {
|
||||
name: name.to_string(),
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: value.to_string(),
|
||||
value: serde_json::json!(value),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1157,7 +1157,7 @@ impl KeyFixture {
|
||||
name: unique_name,
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: value.to_string(),
|
||||
value: serde_json::json!(value),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1177,7 +1177,7 @@ impl KeyFixture {
|
||||
name: name.to_string(),
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: value.to_string(),
|
||||
value: serde_json::json!(value),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1198,7 +1198,7 @@ impl KeyFixture {
|
||||
name: unique_name,
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: value.to_string(),
|
||||
value: serde_json::json!(value),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1218,7 +1218,7 @@ impl KeyFixture {
|
||||
name: name.to_string(),
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: value.to_string(),
|
||||
value: serde_json::json!(value),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1239,7 +1239,7 @@ impl KeyFixture {
|
||||
name: unique_name,
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: value.to_string(),
|
||||
value: serde_json::json!(value),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1254,7 +1254,7 @@ impl KeyFixture {
|
||||
}
|
||||
|
||||
pub fn with_value(mut self, value: &str) -> Self {
|
||||
self.value = value.to_string();
|
||||
self.value = serde_json::json!(value);
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ use helpers::*;
|
||||
use serde_json::json;
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_identity() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -38,6 +39,7 @@ async fn test_create_identity() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_identity_minimal() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -56,6 +58,7 @@ async fn test_create_identity_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_identity_duplicate_login() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -92,6 +95,7 @@ async fn test_create_identity_duplicate_login() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_identity_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -116,6 +120,7 @@ async fn test_find_identity_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_identity_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -125,6 +130,7 @@ async fn test_find_identity_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_identity_by_login() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -148,6 +154,7 @@ async fn test_find_identity_by_login() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_identity_by_login_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -159,6 +166,7 @@ async fn test_find_identity_by_login_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_identities() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -190,6 +198,7 @@ async fn test_list_identities() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_identity() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -225,6 +234,7 @@ async fn test_update_identity() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_identity_partial() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -256,6 +266,7 @@ async fn test_update_identity_partial() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_identity_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -279,6 +290,7 @@ async fn test_update_identity_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_identity() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -311,6 +323,7 @@ async fn test_delete_identity() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_identity_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -320,6 +333,7 @@ async fn test_delete_identity_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_identity_timestamps_auto_populated() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -344,6 +358,7 @@ async fn test_identity_timestamps_auto_populated() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_identity_updated_changes_on_update() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -379,6 +394,7 @@ async fn test_identity_updated_changes_on_update() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_identity_with_complex_attributes() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -419,6 +435,7 @@ async fn test_identity_with_complex_attributes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_identity_login_case_sensitive() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ use serde_json::json;
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_inquiry_minimal() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -83,6 +84,7 @@ async fn test_create_inquiry_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_inquiry_with_response_schema() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -140,6 +142,7 @@ async fn test_create_inquiry_with_response_schema() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_inquiry_with_timeout() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -193,6 +196,7 @@ async fn test_create_inquiry_with_timeout() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_inquiry_with_assigned_user() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -255,6 +259,7 @@ async fn test_create_inquiry_with_assigned_user() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_inquiry_with_invalid_execution_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -280,6 +285,7 @@ async fn test_create_inquiry_with_invalid_execution_fails() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_inquiry_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -331,6 +337,7 @@ async fn test_find_inquiry_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_inquiry_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -340,6 +347,7 @@ async fn test_find_inquiry_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_inquiry_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -385,6 +393,7 @@ async fn test_get_inquiry_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_inquiry_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -399,6 +408,7 @@ async fn test_get_inquiry_by_id_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_inquiries_empty() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -408,6 +418,7 @@ async fn test_list_inquiries_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_inquiries() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -468,6 +479,7 @@ async fn test_list_inquiries() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_inquiry_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -523,6 +535,7 @@ async fn test_update_inquiry_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_inquiry_status_transitions() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -607,6 +620,7 @@ async fn test_update_inquiry_status_transitions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_inquiry_response() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -664,6 +678,7 @@ async fn test_update_inquiry_response() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_inquiry_with_response_and_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -721,6 +736,7 @@ async fn test_update_inquiry_with_response_and_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_inquiry_assignment() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -787,6 +803,7 @@ async fn test_update_inquiry_assignment() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_inquiry_no_changes() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -841,6 +858,7 @@ async fn test_update_inquiry_no_changes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_inquiry_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -862,6 +880,7 @@ async fn test_update_inquiry_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_inquiry() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -911,6 +930,7 @@ async fn test_delete_inquiry() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_inquiry_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -920,6 +940,7 @@ async fn test_delete_inquiry_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_execution_cascades_to_inquiries() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -986,6 +1007,7 @@ async fn test_delete_execution_cascades_to_inquiries() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_inquiries_by_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1064,6 +1086,7 @@ async fn test_find_inquiries_by_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_inquiries_by_execution() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1145,6 +1168,7 @@ async fn test_find_inquiries_by_execution() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_inquiry_timestamps_auto_managed() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1211,6 +1235,7 @@ async fn test_inquiry_timestamps_auto_managed() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_inquiry_complex_response_schema() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ use helpers::*;
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_system_owner() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -36,12 +37,13 @@ async fn test_create_key_system_owner() {
|
||||
assert_eq!(key.owner_action, None);
|
||||
assert_eq!(key.owner_sensor, None);
|
||||
assert!(!key.encrypted);
|
||||
assert_eq!(key.value, "test_value");
|
||||
assert_eq!(key.value, serde_json::json!("test_value"));
|
||||
assert!(key.created.timestamp() > 0);
|
||||
assert!(key.updated.timestamp() > 0);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_system_encrypted() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -61,6 +63,7 @@ async fn test_create_key_system_encrypted() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_identity_owner() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -79,7 +82,7 @@ async fn test_create_key_identity_owner() {
|
||||
assert_eq!(key.owner, Some(identity.id.to_string()));
|
||||
assert_eq!(key.owner_identity, Some(identity.id));
|
||||
assert_eq!(key.owner_pack, None);
|
||||
assert_eq!(key.value, "secret_token");
|
||||
assert_eq!(key.value, serde_json::json!("secret_token"));
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -87,6 +90,7 @@ async fn test_create_key_identity_owner() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_pack_owner() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -104,7 +108,7 @@ async fn test_create_key_pack_owner() {
|
||||
assert_eq!(key.owner, Some(pack.id.to_string()));
|
||||
assert_eq!(key.owner_pack, Some(pack.id));
|
||||
assert_eq!(key.owner_pack_ref, Some(pack.r#ref.clone()));
|
||||
assert_eq!(key.value, "config_value");
|
||||
assert_eq!(key.value, serde_json::json!("config_value"));
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -112,6 +116,7 @@ async fn test_create_key_pack_owner() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_duplicate_ref_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -132,7 +137,7 @@ async fn test_create_key_duplicate_ref_fails() {
|
||||
name: key_ref.clone(),
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: "value1".to_string(),
|
||||
value: serde_json::json!("value1"),
|
||||
};
|
||||
|
||||
KeyRepository::create(&pool, input.clone()).await.unwrap();
|
||||
@@ -143,6 +148,7 @@ async fn test_create_key_duplicate_ref_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_system_with_owner_fields_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -167,7 +173,7 @@ async fn test_create_key_system_with_owner_fields_fails() {
|
||||
name: "invalid".to_string(),
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: "value".to_string(),
|
||||
value: serde_json::json!("value"),
|
||||
};
|
||||
|
||||
let result = KeyRepository::create(&pool, input).await;
|
||||
@@ -175,6 +181,7 @@ async fn test_create_key_system_with_owner_fields_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_identity_without_owner_id_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -193,7 +200,7 @@ async fn test_create_key_identity_without_owner_id_fails() {
|
||||
name: "invalid".to_string(),
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: "value".to_string(),
|
||||
value: serde_json::json!("value"),
|
||||
};
|
||||
|
||||
let result = KeyRepository::create(&pool, input).await;
|
||||
@@ -201,6 +208,7 @@ async fn test_create_key_identity_without_owner_id_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_multiple_owners_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -229,7 +237,7 @@ async fn test_create_key_multiple_owners_fails() {
|
||||
name: "invalid".to_string(),
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: "value".to_string(),
|
||||
value: serde_json::json!("value"),
|
||||
};
|
||||
|
||||
let result = KeyRepository::create(&pool, input).await;
|
||||
@@ -237,6 +245,7 @@ async fn test_create_key_multiple_owners_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_key_invalid_ref_format_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -255,7 +264,7 @@ async fn test_create_key_invalid_ref_format_fails() {
|
||||
name: "uppercase".to_string(),
|
||||
encrypted: false,
|
||||
encryption_key_hash: None,
|
||||
value: "value".to_string(),
|
||||
value: serde_json::json!("value"),
|
||||
};
|
||||
|
||||
let result = KeyRepository::create(&pool, input).await;
|
||||
@@ -267,6 +276,7 @@ async fn test_create_key_invalid_ref_format_fails() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_id_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -285,6 +295,7 @@ async fn test_find_by_id_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_id_not_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -293,6 +304,7 @@ async fn test_find_by_id_not_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_by_id_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -308,6 +320,7 @@ async fn test_get_by_id_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_by_id_not_exists_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -317,6 +330,7 @@ async fn test_get_by_id_not_exists_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_ref_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -334,6 +348,7 @@ async fn test_find_by_ref_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_ref_not_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -344,6 +359,7 @@ async fn test_find_by_ref_not_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_all_keys() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -373,6 +389,7 @@ async fn test_list_all_keys() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_value() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -387,17 +404,18 @@ async fn test_update_value() {
|
||||
tokio::time::sleep(tokio::time::Duration::from_millis(10)).await;
|
||||
|
||||
let input = UpdateKeyInput {
|
||||
value: Some("new_value".to_string()),
|
||||
value: Some(serde_json::json!("new_value")),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let updated = KeyRepository::update(&pool, key.id, input).await.unwrap();
|
||||
|
||||
assert_eq!(updated.value, "new_value");
|
||||
assert_eq!(updated.value, serde_json::json!("new_value"));
|
||||
assert!(updated.updated > original_updated);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_name() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -419,6 +437,7 @@ async fn test_update_name() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_encrypted_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -432,7 +451,7 @@ async fn test_update_encrypted_status() {
|
||||
let input = UpdateKeyInput {
|
||||
encrypted: Some(true),
|
||||
encryption_key_hash: Some("sha256:xyz789".to_string()),
|
||||
value: Some("encrypted_value".to_string()),
|
||||
value: Some(serde_json::json!("encrypted_value")),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -443,10 +462,11 @@ async fn test_update_encrypted_status() {
|
||||
updated.encryption_key_hash,
|
||||
Some("sha256:xyz789".to_string())
|
||||
);
|
||||
assert_eq!(updated.value, "encrypted_value");
|
||||
assert_eq!(updated.value, serde_json::json!("encrypted_value"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_multiple_fields() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -459,7 +479,7 @@ async fn test_update_multiple_fields() {
|
||||
let new_name = format!("updated_name_{}", unique_test_id());
|
||||
let input = UpdateKeyInput {
|
||||
name: Some(new_name.clone()),
|
||||
value: Some("updated_value".to_string()),
|
||||
value: Some(serde_json::json!("updated_value")),
|
||||
encrypted: Some(true),
|
||||
encryption_key_hash: Some("hash123".to_string()),
|
||||
};
|
||||
@@ -467,12 +487,13 @@ async fn test_update_multiple_fields() {
|
||||
let updated = KeyRepository::update(&pool, key.id, input).await.unwrap();
|
||||
|
||||
assert_eq!(updated.name, new_name);
|
||||
assert_eq!(updated.value, "updated_value");
|
||||
assert_eq!(updated.value, serde_json::json!("updated_value"));
|
||||
assert!(updated.encrypted);
|
||||
assert_eq!(updated.encryption_key_hash, Some("hash123".to_string()));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_no_changes() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -495,11 +516,12 @@ async fn test_update_no_changes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_nonexistent_key_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
let input = UpdateKeyInput {
|
||||
value: Some("new_value".to_string()),
|
||||
value: Some(serde_json::json!("new_value")),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -512,6 +534,7 @@ async fn test_update_nonexistent_key_fails() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_existing_key() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -529,6 +552,7 @@ async fn test_delete_existing_key() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_nonexistent_key() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -537,6 +561,7 @@ async fn test_delete_nonexistent_key() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_key_when_identity_deleted() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -563,6 +588,7 @@ async fn test_delete_key_when_identity_deleted() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_key_when_pack_deleted() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -593,6 +619,7 @@ async fn test_delete_key_when_pack_deleted() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_owner_type_system() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -616,6 +643,7 @@ async fn test_find_by_owner_type_system() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_owner_type_identity() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -650,6 +678,7 @@ async fn test_find_by_owner_type_identity() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_owner_type_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -683,6 +712,7 @@ async fn test_find_by_owner_type_pack() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_created_timestamp_set_automatically() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -701,6 +731,7 @@ async fn test_created_timestamp_set_automatically() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_updated_timestamp_changes_on_update() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -715,7 +746,7 @@ async fn test_updated_timestamp_changes_on_update() {
|
||||
tokio::time::sleep(tokio::time::Duration::from_millis(10)).await;
|
||||
|
||||
let input = UpdateKeyInput {
|
||||
value: Some("new_value".to_string()),
|
||||
value: Some(serde_json::json!("new_value")),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -726,6 +757,7 @@ async fn test_updated_timestamp_changes_on_update() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_updated_timestamp_unchanged_on_read() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -753,6 +785,7 @@ async fn test_updated_timestamp_unchanged_on_read() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_key_encrypted_flag() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -779,6 +812,7 @@ async fn test_key_encrypted_flag() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_encryption_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -794,7 +828,7 @@ async fn test_update_encryption_status() {
|
||||
let input = UpdateKeyInput {
|
||||
encrypted: Some(true),
|
||||
encryption_key_hash: Some("sha256:newkey".to_string()),
|
||||
value: Some("encrypted_value".to_string()),
|
||||
value: Some(serde_json::json!("encrypted_value")),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -805,20 +839,20 @@ async fn test_update_encryption_status() {
|
||||
encrypted.encryption_key_hash,
|
||||
Some("sha256:newkey".to_string())
|
||||
);
|
||||
assert_eq!(encrypted.value, "encrypted_value");
|
||||
assert_eq!(encrypted.value, serde_json::json!("encrypted_value"));
|
||||
|
||||
// Decrypt it
|
||||
let input = UpdateKeyInput {
|
||||
encrypted: Some(false),
|
||||
encryption_key_hash: None,
|
||||
value: Some("plain_value".to_string()),
|
||||
value: Some(serde_json::json!("plain_value")),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let decrypted = KeyRepository::update(&pool, key.id, input).await.unwrap();
|
||||
|
||||
assert!(!decrypted.encrypted);
|
||||
assert_eq!(decrypted.value, "plain_value");
|
||||
assert_eq!(decrypted.value, serde_json::json!("plain_value"));
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -826,6 +860,7 @@ async fn test_update_encryption_status() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_multiple_keys_same_pack_different_names() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -851,6 +886,7 @@ async fn test_multiple_keys_same_pack_different_names() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_same_key_name_different_owners() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ use helpers::*;
|
||||
use sqlx::Row;
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_migrations_applied() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -41,6 +42,7 @@ async fn test_migrations_applied() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_pack_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -62,6 +64,7 @@ async fn test_pack_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_action_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -83,6 +86,7 @@ async fn test_action_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_trigger_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -104,6 +108,7 @@ async fn test_trigger_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_sensor_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -125,6 +130,7 @@ async fn test_sensor_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_rule_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -146,6 +152,7 @@ async fn test_rule_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_execution_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -167,6 +174,7 @@ async fn test_execution_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_event_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -188,6 +196,7 @@ async fn test_event_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_enforcement_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -209,6 +218,7 @@ async fn test_enforcement_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_inquiry_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -230,6 +240,7 @@ async fn test_inquiry_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_identity_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -251,6 +262,7 @@ async fn test_identity_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_key_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -272,6 +284,7 @@ async fn test_key_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -293,6 +306,7 @@ async fn test_notification_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_runtime_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -314,6 +328,7 @@ async fn test_runtime_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_table_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -335,6 +350,7 @@ async fn test_worker_table_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_pack_columns() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -381,6 +397,7 @@ async fn test_pack_columns() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_action_columns() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -425,6 +442,7 @@ async fn test_action_columns() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_timestamps_auto_populated() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
clean_database(&pool).await.unwrap();
|
||||
@@ -443,6 +461,7 @@ async fn test_timestamps_auto_populated() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_json_column_storage() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
clean_database(&pool).await.unwrap();
|
||||
@@ -461,6 +480,7 @@ async fn test_json_column_storage() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_array_column_storage() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
clean_database(&pool).await.unwrap();
|
||||
@@ -484,6 +504,7 @@ async fn test_array_column_storage() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_unique_constraints() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
clean_database(&pool).await.unwrap();
|
||||
@@ -498,6 +519,7 @@ async fn test_unique_constraints() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_foreign_key_constraints() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
clean_database(&pool).await.unwrap();
|
||||
@@ -525,6 +547,7 @@ async fn test_foreign_key_constraints() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_enum_types_exist() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ impl NotificationFixture {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_notification_minimal() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -119,6 +120,7 @@ async fn test_create_notification_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_notification_with_content() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -152,6 +154,7 @@ async fn test_create_notification_with_content() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_notification_all_states() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -185,6 +188,7 @@ async fn test_create_notification_all_states() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_notification_by_id() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -205,6 +209,7 @@ async fn test_find_notification_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_notification_by_id_not_found() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
|
||||
@@ -216,6 +221,7 @@ async fn test_find_notification_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_notification_state() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -238,6 +244,7 @@ async fn test_update_notification_state() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_notification_content() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -265,6 +272,7 @@ async fn test_update_notification_content() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_notification_state_and_content() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -289,6 +297,7 @@ async fn test_update_notification_state_and_content() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_notification_no_changes() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -310,6 +319,7 @@ async fn test_update_notification_no_changes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_notification_timestamps() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -337,6 +347,7 @@ async fn test_update_notification_timestamps() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_notification() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -357,6 +368,7 @@ async fn test_delete_notification() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_notification_not_found() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
|
||||
@@ -368,6 +380,7 @@ async fn test_delete_notification_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_notifications() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -408,6 +421,7 @@ async fn test_list_notifications() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_state() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -467,6 +481,7 @@ async fn test_find_by_state() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_state_empty() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -485,6 +500,7 @@ async fn test_find_by_state_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_channel() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -541,6 +557,7 @@ async fn test_find_by_channel() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_channel_empty() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -555,6 +572,7 @@ async fn test_find_by_channel_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_with_complex_content() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -589,6 +607,7 @@ async fn test_notification_with_complex_content() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_entity_types() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -615,6 +634,7 @@ async fn test_notification_entity_types() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_activity_types() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -641,6 +661,7 @@ async fn test_notification_activity_types() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_ordering_by_created() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -702,6 +723,7 @@ async fn test_notification_ordering_by_created() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_timestamps_auto_set() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -724,6 +746,7 @@ async fn test_notification_timestamps_auto_set() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_multiple_notifications_same_entity() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -776,6 +799,7 @@ async fn test_multiple_notifications_same_entity() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_content_null_vs_empty_json() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -794,6 +818,7 @@ async fn test_notification_content_null_vs_empty_json() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_notification_content_to_null() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -817,6 +842,7 @@ async fn test_update_notification_content_to_null() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_state_transition_workflow() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -867,6 +893,7 @@ async fn test_notification_state_transition_workflow() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_list_limit() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
|
||||
@@ -879,6 +906,7 @@ async fn test_notification_list_limit() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_with_special_characters() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -911,6 +939,7 @@ async fn test_notification_with_special_characters() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_with_long_strings() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -944,6 +973,7 @@ async fn test_notification_with_long_strings() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_state_with_multiple_states() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -1018,6 +1048,7 @@ async fn test_find_by_state_with_multiple_states() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_content_array() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -1034,6 +1065,7 @@ async fn test_notification_content_array() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_content_string_value() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -1046,6 +1078,7 @@ async fn test_notification_content_string_value() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_content_number_value() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -1058,6 +1091,7 @@ async fn test_notification_content_number_value() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_parallel_creation() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
|
||||
@@ -1096,6 +1130,7 @@ async fn test_notification_parallel_creation() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_channel_case_sensitive() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -1143,6 +1178,7 @@ async fn test_notification_channel_case_sensitive() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_entity_type_variations() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -1181,6 +1217,7 @@ async fn test_notification_entity_type_variations() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_update_same_state() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -1207,6 +1244,7 @@ async fn test_notification_update_same_state() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_multiple_updates() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
@@ -1230,6 +1268,7 @@ async fn test_notification_multiple_updates() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_notification_get_by_id_alias() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = NotificationFixture::new(pool.clone());
|
||||
|
||||
@@ -12,6 +12,7 @@ use helpers::*;
|
||||
use serde_json::json;
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -32,6 +33,7 @@ async fn test_create_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_pack_duplicate_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -48,6 +50,7 @@ async fn test_create_pack_duplicate_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_pack_with_tags() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -63,6 +66,7 @@ async fn test_create_pack_with_tags() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_pack_standard() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -76,6 +80,7 @@ async fn test_create_pack_standard() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_pack_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -95,6 +100,7 @@ async fn test_find_pack_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_pack_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -104,6 +110,7 @@ async fn test_find_pack_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_pack_by_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -122,6 +129,7 @@ async fn test_find_pack_by_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_pack_by_ref_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -133,6 +141,7 @@ async fn test_find_pack_by_ref_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_packs() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -163,6 +172,7 @@ async fn test_list_packs() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_packs_with_pagination() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -190,6 +200,7 @@ async fn test_list_packs_with_pagination() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -219,6 +230,7 @@ async fn test_update_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_pack_partial() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -246,6 +258,7 @@ async fn test_update_pack_partial() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_pack_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -261,6 +274,7 @@ async fn test_update_pack_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_pack_tags() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -286,6 +300,7 @@ async fn test_update_pack_tags() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -307,6 +322,7 @@ async fn test_delete_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_pack_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -348,6 +364,7 @@ async fn test_delete_pack_not_found() {
|
||||
// }
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_count_packs() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -374,6 +391,7 @@ async fn test_count_packs() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_pack_transaction_commit() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -412,6 +430,7 @@ async fn test_pack_transaction_commit() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_pack_transaction_rollback() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -446,6 +465,7 @@ async fn test_pack_transaction_rollback() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_pack_invalid_ref_format() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -471,6 +491,7 @@ async fn test_pack_invalid_ref_format() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_pack_valid_ref_formats() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ impl PermissionSetFixture {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_permission_set_minimal() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -196,6 +197,7 @@ async fn test_create_permission_set_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_permission_set_with_pack() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -226,6 +228,7 @@ async fn test_create_permission_set_with_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_permission_set_with_complex_grants() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -250,6 +253,7 @@ async fn test_create_permission_set_with_complex_grants() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_set_ref_format_validation() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -282,6 +286,7 @@ async fn test_permission_set_ref_format_validation() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_set_ref_lowercase() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -301,6 +306,7 @@ async fn test_permission_set_ref_lowercase() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_set_duplicate_ref() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -325,6 +331,7 @@ async fn test_permission_set_duplicate_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_permission_set_by_id() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -342,6 +349,7 @@ async fn test_find_permission_set_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_permission_set_by_id_not_found() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
|
||||
@@ -353,6 +361,7 @@ async fn test_find_permission_set_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_permission_sets() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -372,6 +381,7 @@ async fn test_list_permission_sets() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_permission_set_label() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -393,6 +403,7 @@ async fn test_update_permission_set_label() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_permission_set_grants() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -418,6 +429,7 @@ async fn test_update_permission_set_grants() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_permission_set_all_fields() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -441,6 +453,7 @@ async fn test_update_permission_set_all_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_permission_set_no_changes() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -462,6 +475,7 @@ async fn test_update_permission_set_no_changes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_permission_set_timestamps() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -487,6 +501,7 @@ async fn test_update_permission_set_timestamps() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_permission_set() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -507,6 +522,7 @@ async fn test_delete_permission_set() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_permission_set_not_found() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
|
||||
@@ -518,6 +534,7 @@ async fn test_delete_permission_set_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_set_cascade_from_pack() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -538,6 +555,7 @@ async fn test_permission_set_cascade_from_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_set_timestamps_auto_set() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -557,6 +575,7 @@ async fn test_permission_set_timestamps_auto_set() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_permission_assignment() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -572,6 +591,7 @@ async fn test_create_permission_assignment() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_permission_assignment_duplicate() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -593,6 +613,7 @@ async fn test_create_permission_assignment_duplicate() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_permission_assignment_invalid_identity() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -609,6 +630,7 @@ async fn test_create_permission_assignment_invalid_identity() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_permission_assignment_invalid_permset() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -625,6 +647,7 @@ async fn test_create_permission_assignment_invalid_permset() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_permission_assignment_by_id() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -644,6 +667,7 @@ async fn test_find_permission_assignment_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_permission_assignment_by_id_not_found() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
|
||||
@@ -655,6 +679,7 @@ async fn test_find_permission_assignment_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_permission_assignments() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -676,6 +701,7 @@ async fn test_list_permission_assignments() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_assignments_by_identity() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -700,6 +726,7 @@ async fn test_find_assignments_by_identity() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_assignments_by_identity_empty() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -714,6 +741,7 @@ async fn test_find_assignments_by_identity_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_permission_assignment() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -736,6 +764,7 @@ async fn test_delete_permission_assignment() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_permission_assignment_not_found() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
|
||||
@@ -747,6 +776,7 @@ async fn test_delete_permission_assignment_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_assignment_cascade_from_identity() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -769,6 +799,7 @@ async fn test_permission_assignment_cascade_from_identity() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_assignment_cascade_from_permset() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -791,6 +822,7 @@ async fn test_permission_assignment_cascade_from_permset() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_assignment_timestamp_auto_set() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -807,6 +839,7 @@ async fn test_permission_assignment_timestamp_auto_set() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_multiple_identities_same_permset() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -832,6 +865,7 @@ async fn test_multiple_identities_same_permset() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_one_identity_multiple_permsets() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -864,6 +898,7 @@ async fn test_one_identity_multiple_permsets() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_set_ordering() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
@@ -904,6 +939,7 @@ async fn test_permission_set_ordering() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_permission_assignment_ordering() {
|
||||
let pool = create_test_pool().await.expect("Failed to create pool");
|
||||
let fixture = PermissionSetFixture::new(pool.clone());
|
||||
|
||||
@@ -9,6 +9,7 @@ mod helpers;
|
||||
use helpers::{ActionFixture, PackFixture};
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_upsert_queue_stats() {
|
||||
let pool = helpers::create_test_pool().await.unwrap();
|
||||
|
||||
@@ -66,6 +67,7 @@ async fn test_upsert_queue_stats() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_queue_stats_by_action() {
|
||||
let pool = helpers::create_test_pool().await.unwrap();
|
||||
|
||||
@@ -107,6 +109,7 @@ async fn test_find_queue_stats_by_action() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_active_queue_stats() {
|
||||
let pool = helpers::create_test_pool().await.unwrap();
|
||||
|
||||
@@ -171,6 +174,7 @@ async fn test_list_active_queue_stats() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_queue_stats() {
|
||||
let pool = helpers::create_test_pool().await.unwrap();
|
||||
|
||||
@@ -220,6 +224,7 @@ async fn test_delete_queue_stats() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_batch_upsert_queue_stats() {
|
||||
let pool = helpers::create_test_pool().await.unwrap();
|
||||
|
||||
@@ -262,6 +267,7 @@ async fn test_batch_upsert_queue_stats() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_clear_stale_queue_stats() {
|
||||
let pool = helpers::create_test_pool().await.unwrap();
|
||||
|
||||
@@ -301,6 +307,7 @@ async fn test_clear_stale_queue_stats() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_queue_stats_cascade_delete() {
|
||||
let pool = helpers::create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ async fn setup_db() -> PgPool {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_artifact() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("create_artifact");
|
||||
@@ -109,6 +110,7 @@ async fn test_create_artifact() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_id_exists() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("find_by_id_exists");
|
||||
@@ -130,6 +132,7 @@ async fn test_find_by_id_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_id_not_exists() {
|
||||
let pool = setup_db().await;
|
||||
let non_existent_id = 999_999_999_999i64;
|
||||
@@ -142,6 +145,7 @@ async fn test_find_by_id_not_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_by_id_not_found_error() {
|
||||
let pool = setup_db().await;
|
||||
let non_existent_id = 999_999_999_998i64;
|
||||
@@ -158,6 +162,7 @@ async fn test_get_by_id_not_found_error() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_ref_exists() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("find_by_ref_exists");
|
||||
@@ -177,6 +182,7 @@ async fn test_find_by_ref_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_ref_not_exists() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("find_by_ref_not_exists");
|
||||
@@ -189,6 +195,7 @@ async fn test_find_by_ref_not_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_artifacts() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("list");
|
||||
@@ -215,6 +222,7 @@ async fn test_list_artifacts() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_artifact_ref() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("update_ref");
|
||||
@@ -241,6 +249,7 @@ async fn test_update_artifact_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_artifact_all_fields() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("update_all");
|
||||
@@ -285,6 +294,7 @@ async fn test_update_artifact_all_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_artifact_no_changes() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("update_no_changes");
|
||||
@@ -306,6 +316,7 @@ async fn test_update_artifact_no_changes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_artifact() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("delete");
|
||||
@@ -329,6 +340,7 @@ async fn test_delete_artifact() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_artifact_not_exists() {
|
||||
let pool = setup_db().await;
|
||||
let non_existent_id = 999_999_999_997i64;
|
||||
@@ -345,6 +357,7 @@ async fn test_delete_artifact_not_exists() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_all_types() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("all_types");
|
||||
@@ -372,6 +385,7 @@ async fn test_artifact_all_types() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_all_scopes() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("all_scopes");
|
||||
@@ -397,6 +411,7 @@ async fn test_artifact_all_scopes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_all_retention_policies() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("all_retention");
|
||||
@@ -425,6 +440,7 @@ async fn test_artifact_all_retention_policies() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_scope() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("find_by_scope");
|
||||
@@ -456,6 +472,7 @@ async fn test_find_by_scope() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_owner() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("find_by_owner");
|
||||
@@ -486,6 +503,7 @@ async fn test_find_by_owner() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_type() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("find_by_type");
|
||||
@@ -515,6 +533,7 @@ async fn test_find_by_type() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_scope_and_owner() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("find_by_scope_and_owner");
|
||||
@@ -550,6 +569,7 @@ async fn test_find_by_scope_and_owner() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_retention_policy() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("find_by_retention");
|
||||
@@ -584,6 +604,7 @@ async fn test_find_by_retention_policy() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_timestamps_auto_set_on_create() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("timestamps_create");
|
||||
@@ -599,6 +620,7 @@ async fn test_timestamps_auto_set_on_create() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_updated_timestamp_changes_on_update() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("timestamps_update");
|
||||
@@ -629,6 +651,7 @@ async fn test_updated_timestamp_changes_on_update() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_with_empty_owner() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("empty_owner");
|
||||
@@ -643,6 +666,7 @@ async fn test_artifact_with_empty_owner() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_with_special_characters_in_ref() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("special_chars");
|
||||
@@ -660,6 +684,7 @@ async fn test_artifact_with_special_characters_in_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_with_zero_retention_limit() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("zero_retention");
|
||||
@@ -674,6 +699,7 @@ async fn test_artifact_with_zero_retention_limit() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_with_negative_retention_limit() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("negative_retention");
|
||||
@@ -688,6 +714,7 @@ async fn test_artifact_with_negative_retention_limit() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_with_large_retention_limit() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("large_retention");
|
||||
@@ -702,6 +729,7 @@ async fn test_artifact_with_large_retention_limit() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_artifact_with_long_ref() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("long_ref");
|
||||
@@ -716,6 +744,7 @@ async fn test_artifact_with_long_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_multiple_artifacts_same_ref_allowed() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("duplicate_ref");
|
||||
@@ -744,6 +773,7 @@ async fn test_multiple_artifacts_same_ref_allowed() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_scope_ordered_by_created() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = ArtifactFixture::new("scope_ordering");
|
||||
|
||||
@@ -117,6 +117,7 @@ async fn setup_db() -> PgPool {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_runtime() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("create_runtime");
|
||||
@@ -139,6 +140,7 @@ async fn test_create_runtime() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_runtime_minimal() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("create_runtime_minimal");
|
||||
@@ -157,6 +159,7 @@ async fn test_create_runtime_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_runtime_by_id() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("find_by_id");
|
||||
@@ -176,6 +179,7 @@ async fn test_find_runtime_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_runtime_by_id_not_found() {
|
||||
let pool = setup_db().await;
|
||||
|
||||
@@ -187,6 +191,7 @@ async fn test_find_runtime_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_runtime_by_ref() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("find_by_ref");
|
||||
@@ -206,6 +211,7 @@ async fn test_find_runtime_by_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_runtime_by_ref_not_found() {
|
||||
let pool = setup_db().await;
|
||||
|
||||
@@ -217,6 +223,7 @@ async fn test_find_runtime_by_ref_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_runtimes() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("list_runtimes");
|
||||
@@ -241,6 +248,7 @@ async fn test_list_runtimes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_runtime() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("update_runtime");
|
||||
@@ -275,6 +283,7 @@ async fn test_update_runtime() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_runtime_partial() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("update_partial");
|
||||
@@ -303,6 +312,7 @@ async fn test_update_runtime_partial() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_runtime_empty() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("update_empty");
|
||||
@@ -325,6 +335,7 @@ async fn test_update_runtime_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_runtime() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("delete_runtime");
|
||||
@@ -348,6 +359,7 @@ async fn test_delete_runtime() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_runtime_not_found() {
|
||||
let pool = setup_db().await;
|
||||
|
||||
@@ -373,6 +385,7 @@ async fn test_delete_runtime_not_found() {
|
||||
// }
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_pack() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("find_by_pack");
|
||||
@@ -434,6 +447,7 @@ async fn test_find_by_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_pack_empty() {
|
||||
let pool = setup_db().await;
|
||||
|
||||
@@ -445,6 +459,7 @@ async fn test_find_by_pack_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_runtime_created_successfully() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("created_test");
|
||||
@@ -467,6 +482,7 @@ async fn test_runtime_created_successfully() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_duplicate_ref_fails() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("duplicate_ref");
|
||||
@@ -482,6 +498,7 @@ async fn test_duplicate_ref_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_json_fields() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("json_fields");
|
||||
@@ -500,6 +517,7 @@ async fn test_json_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_empty_json_distributions() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("empty_json");
|
||||
@@ -516,6 +534,7 @@ async fn test_empty_json_distributions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_ordering() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("list_ordering");
|
||||
@@ -558,6 +577,7 @@ async fn test_list_ordering() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_timestamps() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("timestamps");
|
||||
@@ -577,6 +597,7 @@ async fn test_timestamps() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_changes_timestamp() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("timestamp_update");
|
||||
@@ -602,6 +623,7 @@ async fn test_update_changes_timestamp() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_pack_ref_without_pack_id() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = RuntimeFixture::new("pack_ref_only");
|
||||
|
||||
@@ -101,6 +101,7 @@ async fn setup_db() -> PgPool {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_worker() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("create_worker");
|
||||
@@ -125,6 +126,7 @@ async fn test_create_worker() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_worker_minimal() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("create_worker_minimal");
|
||||
@@ -145,6 +147,7 @@ async fn test_create_worker_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_worker_by_id() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("find_by_id");
|
||||
@@ -165,6 +168,7 @@ async fn test_find_worker_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_worker_by_id_not_found() {
|
||||
let pool = setup_db().await;
|
||||
|
||||
@@ -176,6 +180,7 @@ async fn test_find_worker_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_worker_by_name() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("find_by_name");
|
||||
@@ -195,6 +200,7 @@ async fn test_find_worker_by_name() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_worker_by_name_not_found() {
|
||||
let pool = setup_db().await;
|
||||
|
||||
@@ -206,6 +212,7 @@ async fn test_find_worker_by_name_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_workers() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("list_workers");
|
||||
@@ -230,6 +237,7 @@ async fn test_list_workers() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_worker() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("update_worker");
|
||||
@@ -267,6 +275,7 @@ async fn test_update_worker() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_worker_partial() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("update_partial");
|
||||
@@ -298,6 +307,7 @@ async fn test_update_worker_partial() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_worker_empty() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("update_empty");
|
||||
@@ -320,6 +330,7 @@ async fn test_update_worker_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_worker() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("delete_worker");
|
||||
@@ -343,6 +354,7 @@ async fn test_delete_worker() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_worker_not_found() {
|
||||
let pool = setup_db().await;
|
||||
|
||||
@@ -358,6 +370,7 @@ async fn test_delete_worker_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_status_active() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("find_by_status_active");
|
||||
@@ -393,6 +406,7 @@ async fn test_find_by_status_active() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_status_all_statuses() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("find_by_status_all");
|
||||
@@ -421,6 +435,7 @@ async fn test_find_by_status_all_statuses() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_type_local() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("find_by_type_local");
|
||||
@@ -451,6 +466,7 @@ async fn test_find_by_type_local() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_type_all_types() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("find_by_type_all");
|
||||
@@ -474,6 +490,7 @@ async fn test_find_by_type_all_types() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_heartbeat() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("update_heartbeat");
|
||||
@@ -503,6 +520,7 @@ async fn test_update_heartbeat() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_heartbeat_multiple_times() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("heartbeat_multiple");
|
||||
@@ -544,6 +562,7 @@ async fn test_update_heartbeat_multiple_times() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_with_runtime() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("with_runtime");
|
||||
@@ -593,6 +612,7 @@ async fn test_worker_with_runtime() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_type_local() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("type_local");
|
||||
@@ -606,6 +626,7 @@ async fn test_worker_type_local() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_type_remote() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("type_remote");
|
||||
@@ -619,6 +640,7 @@ async fn test_worker_type_remote() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_type_container() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("type_container");
|
||||
@@ -632,6 +654,7 @@ async fn test_worker_type_container() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_status_active() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("status_active");
|
||||
@@ -646,6 +669,7 @@ async fn test_worker_status_active() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_status_inactive() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("status_inactive");
|
||||
@@ -660,6 +684,7 @@ async fn test_worker_status_inactive() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_status_busy() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("status_busy");
|
||||
@@ -674,6 +699,7 @@ async fn test_worker_status_busy() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_worker_status_error() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("status_error");
|
||||
@@ -692,6 +718,7 @@ async fn test_worker_status_error() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_duplicate_name_allowed() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("duplicate_name");
|
||||
@@ -718,6 +745,7 @@ async fn test_duplicate_name_allowed() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_json_fields() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("json_fields");
|
||||
@@ -737,6 +765,7 @@ async fn test_json_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_null_json_fields() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("null_json");
|
||||
@@ -751,6 +780,7 @@ async fn test_null_json_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_null_status() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("null_status");
|
||||
@@ -765,6 +795,7 @@ async fn test_null_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_ordering() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("list_ordering");
|
||||
@@ -807,6 +838,7 @@ async fn test_list_ordering() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_timestamps() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("timestamps");
|
||||
@@ -826,6 +858,7 @@ async fn test_timestamps() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_changes_timestamp() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("timestamp_update");
|
||||
@@ -851,6 +884,7 @@ async fn test_update_changes_timestamp() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_heartbeat_updates_timestamp() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("heartbeat_updates");
|
||||
@@ -879,6 +913,7 @@ async fn test_heartbeat_updates_timestamp() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_port_range() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("port_range");
|
||||
@@ -899,6 +934,7 @@ async fn test_port_range() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_status_lifecycle() {
|
||||
let pool = setup_db().await;
|
||||
let fixture = WorkerFixture::new("status_lifecycle");
|
||||
|
||||
@@ -20,6 +20,7 @@ use serde_json::json;
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_rule() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -80,6 +81,7 @@ async fn test_create_rule() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_rule_disabled() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -121,6 +123,7 @@ async fn test_create_rule_disabled() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_rule_with_complex_conditions() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -170,6 +173,7 @@ async fn test_create_rule_with_complex_conditions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_rule_duplicate_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -246,6 +250,7 @@ async fn test_create_rule_duplicate_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_rule_invalid_ref_format_uppercase() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -287,6 +292,7 @@ async fn test_create_rule_invalid_ref_format_uppercase() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_rule_invalid_ref_format_no_dot() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -332,6 +338,7 @@ async fn test_create_rule_invalid_ref_format_no_dot() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_rule_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -380,6 +387,7 @@ async fn test_find_rule_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_rule_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -389,6 +397,7 @@ async fn test_find_rule_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_rule_by_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -437,6 +446,7 @@ async fn test_find_rule_by_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_rule_by_ref_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -448,6 +458,7 @@ async fn test_find_rule_by_ref_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_rules() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -500,6 +511,7 @@ async fn test_list_rules() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_rules_ordered_by_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -558,6 +570,7 @@ async fn test_list_rules_ordered_by_ref() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_rule_label() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -610,6 +623,7 @@ async fn test_update_rule_label() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_rule_description() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -660,6 +674,7 @@ async fn test_update_rule_description() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_rule_conditions() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -711,6 +726,7 @@ async fn test_update_rule_conditions() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_rule_enabled() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -763,6 +779,7 @@ async fn test_update_rule_enabled() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_rule_multiple_fields() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -820,6 +837,7 @@ async fn test_update_rule_multiple_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_rule_no_changes() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -872,6 +890,7 @@ async fn test_update_rule_no_changes() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_rule() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -919,6 +938,7 @@ async fn test_delete_rule() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_rule_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -932,6 +952,7 @@ async fn test_delete_rule_not_found() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_rules_by_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1021,6 +1042,7 @@ async fn test_find_rules_by_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_rules_by_action() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1102,6 +1124,7 @@ async fn test_find_rules_by_action() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_rules_by_trigger() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1185,6 +1208,7 @@ async fn test_find_rules_by_trigger() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enabled_rules() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1264,6 +1288,7 @@ async fn test_find_enabled_rules() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_cascade_delete_pack_deletes_rules() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1319,6 +1344,7 @@ async fn test_cascade_delete_pack_deletes_rules() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_rule_timestamps() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ use serde_json::json;
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_sensor_minimal() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -68,6 +69,7 @@ async fn test_create_sensor_minimal() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_sensor_with_param_schema() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -119,6 +121,7 @@ async fn test_create_sensor_with_param_schema() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_sensor_without_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -150,6 +153,7 @@ async fn test_create_sensor_without_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_sensor_duplicate_ref_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -199,6 +203,7 @@ async fn test_create_sensor_duplicate_ref_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_sensor_invalid_ref_format_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -252,6 +257,7 @@ async fn test_create_sensor_invalid_ref_format_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_sensor_invalid_pack_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -288,6 +294,7 @@ async fn test_create_sensor_invalid_pack_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_sensor_invalid_trigger_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -319,6 +326,7 @@ async fn test_create_sensor_invalid_trigger_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_sensor_invalid_runtime_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -354,6 +362,7 @@ async fn test_create_sensor_invalid_runtime_fails() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_id_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -397,6 +406,7 @@ async fn test_find_by_id_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_id_not_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -405,6 +415,7 @@ async fn test_find_by_id_not_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_by_id_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -443,6 +454,7 @@ async fn test_get_by_id_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_by_id_not_exists_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -452,6 +464,7 @@ async fn test_get_by_id_not_exists_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_ref_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -494,6 +507,7 @@ async fn test_find_by_ref_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_ref_not_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -504,6 +518,7 @@ async fn test_find_by_ref_not_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_by_ref_exists() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -544,6 +559,7 @@ async fn test_get_by_ref_exists() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_get_by_ref_not_exists_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -553,6 +569,7 @@ async fn test_get_by_ref_not_exists_fails() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_all_sensors() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -610,6 +627,7 @@ async fn test_list_all_sensors() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_empty() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -624,6 +642,7 @@ async fn test_list_empty() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_label() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -676,6 +695,7 @@ async fn test_update_label() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_description() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -720,6 +740,7 @@ async fn test_update_description() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_entrypoint() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -764,6 +785,7 @@ async fn test_update_entrypoint() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_enabled_status() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -823,6 +845,7 @@ async fn test_update_enabled_status() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_param_schema() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -877,6 +900,7 @@ async fn test_update_param_schema() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_multiple_fields() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -929,6 +953,7 @@ async fn test_update_multiple_fields() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_no_changes() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -978,6 +1003,7 @@ async fn test_update_no_changes() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_nonexistent_sensor_fails() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -995,6 +1021,7 @@ async fn test_update_nonexistent_sensor_fails() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_existing_sensor() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1037,6 +1064,7 @@ async fn test_delete_existing_sensor() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_nonexistent_sensor() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1045,6 +1073,7 @@ async fn test_delete_nonexistent_sensor() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_sensor_when_pack_deleted() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1088,6 +1117,7 @@ async fn test_delete_sensor_when_pack_deleted() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_sensor_when_trigger_deleted() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1131,6 +1161,7 @@ async fn test_delete_sensor_when_trigger_deleted() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_sensor_when_runtime_deleted() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1178,6 +1209,7 @@ async fn test_delete_sensor_when_runtime_deleted() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_trigger() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1252,6 +1284,7 @@ async fn test_find_by_trigger() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_trigger_no_sensors() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1273,6 +1306,7 @@ async fn test_find_by_trigger_no_sensors() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enabled() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1329,6 +1363,7 @@ async fn test_find_enabled() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enabled_empty() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1368,6 +1403,7 @@ async fn test_find_enabled_empty() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1453,6 +1489,7 @@ async fn test_find_by_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_pack_no_sensors() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1473,6 +1510,7 @@ async fn test_find_by_pack_no_sensors() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_created_timestamp_set_automatically() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1514,6 +1552,7 @@ async fn test_created_timestamp_set_automatically() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_updated_timestamp_changes_on_update() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1564,6 +1603,7 @@ async fn test_updated_timestamp_changes_on_update() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_updated_timestamp_unchanged_on_read() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1614,6 +1654,7 @@ async fn test_updated_timestamp_unchanged_on_read() {
|
||||
// ============================================================================
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_param_schema_complex_structure() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -1688,6 +1729,7 @@ async fn test_param_schema_complex_structure() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_param_schema_can_be_null() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ use helpers::*;
|
||||
use serde_json::json;
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_trigger() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -48,6 +49,7 @@ async fn test_create_trigger() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_trigger_without_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -72,6 +74,7 @@ async fn test_create_trigger_without_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_trigger_with_schemas() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -116,6 +119,7 @@ async fn test_create_trigger_with_schemas() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_trigger_disabled() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -138,6 +142,7 @@ async fn test_create_trigger_disabled() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_create_trigger_duplicate_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -182,6 +187,7 @@ async fn test_create_trigger_duplicate_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_trigger_by_id() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -215,6 +221,7 @@ async fn test_find_trigger_by_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_trigger_by_id_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -224,6 +231,7 @@ async fn test_find_trigger_by_id_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_trigger_by_ref() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -257,6 +265,7 @@ async fn test_find_trigger_by_ref() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_trigger_by_ref_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -268,6 +277,7 @@ async fn test_find_trigger_by_ref_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_list_triggers() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -314,6 +324,7 @@ async fn test_list_triggers() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_triggers_by_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -384,6 +395,7 @@ async fn test_find_triggers_by_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_enabled_triggers() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -436,6 +448,7 @@ async fn test_find_enabled_triggers() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_trigger() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -483,6 +496,7 @@ async fn test_update_trigger() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_trigger_partial() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -520,6 +534,7 @@ async fn test_update_trigger_partial() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_trigger_schemas() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -569,6 +584,7 @@ async fn test_update_trigger_schemas() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_update_trigger_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -593,6 +609,7 @@ async fn test_update_trigger_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_trigger() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -629,6 +646,7 @@ async fn test_delete_trigger() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_delete_trigger_not_found() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -638,6 +656,7 @@ async fn test_delete_trigger_not_found() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_trigger_timestamps_auto_populated() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -666,6 +685,7 @@ async fn test_trigger_timestamps_auto_populated() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_trigger_updated_changes_on_update() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -709,6 +729,7 @@ async fn test_trigger_updated_changes_on_update() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_multiple_triggers_same_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
@@ -754,6 +775,7 @@ async fn test_multiple_triggers_same_pack() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_trigger_cascade_delete_with_pack() {
|
||||
let pool = create_test_pool().await.unwrap();
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ async fn create_test_trigger(pool: &PgPool) -> Trigger {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_webhook_enable() {
|
||||
let pool = setup_test_db().await;
|
||||
let trigger = create_test_trigger(&pool).await;
|
||||
@@ -76,6 +77,7 @@ async fn test_webhook_enable() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_webhook_disable() {
|
||||
let pool = setup_test_db().await;
|
||||
let trigger = create_test_trigger(&pool).await;
|
||||
@@ -113,6 +115,7 @@ async fn test_webhook_disable() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_webhook_key_regeneration() {
|
||||
let pool = setup_test_db().await;
|
||||
let trigger = create_test_trigger(&pool).await;
|
||||
@@ -153,6 +156,7 @@ async fn test_webhook_key_regeneration() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_find_by_webhook_key() {
|
||||
let pool = setup_test_db().await;
|
||||
let trigger = create_test_trigger(&pool).await;
|
||||
@@ -189,6 +193,7 @@ async fn test_find_by_webhook_key() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_webhook_key_uniqueness() {
|
||||
let pool = setup_test_db().await;
|
||||
let trigger1 = create_test_trigger(&pool).await;
|
||||
@@ -220,6 +225,7 @@ async fn test_webhook_key_uniqueness() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "integration test — requires database"]
|
||||
async fn test_enable_webhook_idempotent() {
|
||||
let pool = setup_test_db().await;
|
||||
let trigger = create_test_trigger(&pool).await;
|
||||
|
||||
Reference in New Issue
Block a user