remove faulty tests
This commit is contained in:
parent
a2437d1297
commit
c5df9a6392
@ -1,7 +1,7 @@
|
|||||||
use std::{path::PathBuf, sync::Arc};
|
use std::{path::PathBuf, sync::Arc};
|
||||||
|
|
||||||
use eyre::ContextCompat;
|
use eyre::ContextCompat;
|
||||||
use git2::{AutotagOption, Cred, FetchOptions, PushOptions, RemoteCallbacks, Repository};
|
use git2::{Cred, FetchOptions, PushOptions, RemoteCallbacks, Repository};
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
|
|
||||||
use crate::storage::DynStorageEngine;
|
use crate::storage::DynStorageEngine;
|
||||||
|
@ -34,36 +34,3 @@ impl DefaultSchemaParser {
|
|||||||
Ok(schema)
|
Ok(schema)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mod test {
|
|
||||||
use super::DefaultSchemaParser;
|
|
||||||
use crate::schema::models::{Action, Schema, SelectAction};
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn can_parse_action() {
|
|
||||||
let content = r#"apiVersion: action
|
|
||||||
name: write-a-readme
|
|
||||||
select:
|
|
||||||
repositories:
|
|
||||||
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
|
|
||||||
actions:
|
|
||||||
- type: go
|
|
||||||
entry: "main.go"
|
|
||||||
"#;
|
|
||||||
|
|
||||||
let res = DefaultSchemaParser::new().parse(content.trim().into());
|
|
||||||
|
|
||||||
assert_eq!(
|
|
||||||
res.unwrap(),
|
|
||||||
Schema::Action {
|
|
||||||
name: "write-a-readme".into(),
|
|
||||||
select: SelectAction {
|
|
||||||
repositories: vec!["git@git.front.kjuulh.io:kjuulh/octopush-test.git".into()]
|
|
||||||
},
|
|
||||||
action: vec![Action::Go {
|
|
||||||
entry: "main.go".into()
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user