Skip to main content

reifydb_core/testing/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2026 ReifyDB
3
4use reifydb_value::value::{Value, duration::Duration};
5
6use crate::{
7	common::CommitVersion,
8	interface::catalog::config::{ConfigKey, GetConfig},
9	value::column::columns::Columns,
10};
11
12#[derive(Clone, Debug)]
13pub struct CapturedEvent {
14	pub sequence: u64,
15	pub namespace: String,
16	pub event: String,
17	pub variant: String,
18	pub depth: u8,
19	pub columns: Columns,
20}
21
22#[derive(Clone, Debug)]
23pub struct CapturedInvocation {
24	pub sequence: u64,
25	pub namespace: String,
26	pub handler: String,
27	pub event: String,
28	pub variant: String,
29	pub duration: Duration,
30	pub outcome: String,
31	pub message: String,
32}
33
34pub struct TestingChanged {
35	pub object_type: &'static str,
36}
37
38impl TestingChanged {
39	pub fn new(object_type: &'static str) -> Self {
40		Self {
41			object_type,
42		}
43	}
44}
45
46pub struct ProfileConfig;
47
48impl GetConfig for ProfileConfig {
49	fn get_config(&self, key: ConfigKey) -> Value {
50		key.default_value()
51	}
52
53	fn get_config_at(&self, key: ConfigKey, _version: CommitVersion) -> Value {
54		key.default_value()
55	}
56}