fix(dev): stabilize macOS signing and isolate test keys

This commit is contained in:
t8y2 committed 2026-09-25 02:39:41 +08:00
1 parent 7b825db71b
commit 55c07f5852
99 files changed
+1022 -533

No files matched your search

+2 -2
View File
@@ -894,7 +894,6 @@ async fn ensure_connection_writable(state: &AppState, conn_id: &str, operation:
mod tests {
use super::*;
use crate::models::connection::{ConnectionConfig, DatabaseType};
use crate::storage::Storage;
use std::time::{SystemTime, UNIX_EPOCH};
fn mq_connection(read_only: bool) -> ConnectionConfig {
@@ -987,7 +986,8 @@ mod tests {
SystemTime::now().duration_since(UNIX_EPOCH).expect("system time should be after UNIX epoch").as_nanos();
let dir = std::env::temp_dir().join(format!("dbx-mq-service-test-{stamp}"));
std::fs::create_dir_all(&dir).expect("failed to create test directory");
let storage = Storage::open(&dir.join("storage.db")).await.expect("failed to open test storage");
let storage =
crate::persistence::test_storage::open(&dir.join("storage.db")).await.expect("failed to open test storage");
let state = AppState::new_with_plugin_dir(storage, dir.join("plugins"));
state.configs.write().await.insert(config.id.clone(), config);
(state, dir)
+2 -2
View File
@@ -639,7 +639,7 @@ mod tests {
async fn raw_mutation_requires_writable_connection_before_adapter_build() {
let dir = std::env::temp_dir().join(format!("dbx-nacos-service-test-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).unwrap();
let storage = crate::storage::Storage::open(&dir.join("storage.db")).await.unwrap();
let storage = crate::persistence::test_storage::open(&dir.join("storage.db")).await.unwrap();
let state = AppState::new(storage);
let mut cfg = crate::models::connection::ConnectionConfig {
docs_notes_path: None,
@@ -721,7 +721,7 @@ mod tests {
async fn config_rollback_requires_writable_connection_before_adapter_build() {
let dir = std::env::temp_dir().join(format!("dbx-nacos-service-test-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).unwrap();
let storage = crate::storage::Storage::open(&dir.join("storage.db")).await.unwrap();
let storage = crate::persistence::test_storage::open(&dir.join("storage.db")).await.unwrap();
let state = AppState::new(storage);
let cfg = crate::models::connection::ConnectionConfig {
docs_notes_path: None,