mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-09-09 19:31:57 +02:00
feat(import): merge re-imports from a linked source instead of duplicating (#618)
This commit is contained in:
@@ -209,6 +209,7 @@ impl TryFrom<AnyModel> for SyncModel {
|
||||
AnyModel::GrpcEvent(m) => return Err(UnknownModel(m.model)),
|
||||
AnyModel::HttpResponse(m) => return Err(UnknownModel(m.model)),
|
||||
AnyModel::HttpResponseEvent(m) => return Err(UnknownModel(m.model)),
|
||||
AnyModel::ImportSource(m) => return Err(UnknownModel(m.model)),
|
||||
AnyModel::KeyValue(m) => return Err(UnknownModel(m.model)),
|
||||
AnyModel::Plugin(m) => return Err(UnknownModel(m.model)),
|
||||
AnyModel::Settings(m) => return Err(UnknownModel(m.model)),
|
||||
@@ -226,6 +227,14 @@ mod migration_tests {
|
||||
use crate::error::Result;
|
||||
use crate::models::SyncModel;
|
||||
|
||||
#[test]
|
||||
fn import_sources_are_excluded_from_sync() {
|
||||
let model = yaak_models::models::AnyModel::ImportSource(
|
||||
yaak_models::models::ImportSource::default(),
|
||||
);
|
||||
assert!(SyncModel::try_from(model).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deserializes_environment_via_syncmodel_with_fixups() -> Result<()> {
|
||||
let raw = r#"
|
||||
|
||||
Reference in New Issue
Block a user