feat: make admin_fn macro usable outside common_function module (#5850)

* feat: make `admin_fn` macro usable outside common_function module

* chore: expose mod for testing
This commit is contained in:
Weny Xu
2025-04-08 22:25:37 +08:00
committed by GitHub
parent 72625958bf
commit 7e3cad8a55
5 changed files with 19 additions and 8 deletions

View File

@@ -8,6 +8,7 @@ license.workspace = true
workspace = true
[features]
testing = []
default = ["geo"]
geo = ["geohash", "h3o", "s2", "wkt", "geo-types", "dep:geo"]

View File

@@ -32,7 +32,7 @@ pub struct FunctionContext {
impl FunctionContext {
/// Create a mock [`FunctionContext`] for test.
#[cfg(test)]
#[cfg(any(test, feature = "testing"))]
pub fn mock() -> Self {
Self {
query_ctx: QueryContextBuilder::default().build().into(),

View File

@@ -28,7 +28,7 @@ pub struct FunctionState {
impl FunctionState {
/// Create a mock [`FunctionState`] for test.
#[cfg(test)]
#[cfg(any(test, feature = "testing"))]
pub fn mock() -> Self {
use std::sync::Arc;