From c5df9a63920764fc618209fcbfd2247676aec84d Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 27 Nov 2022 11:58:35 +0100 Subject: [PATCH] remove faulty tests --- crates/octopush_core/src/git/git.rs | 2 +- crates/octopush_core/src/schema/parser.rs | 33 ----------------------- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/crates/octopush_core/src/git/git.rs b/crates/octopush_core/src/git/git.rs index 44334f0..8bab12d 100644 --- a/crates/octopush_core/src/git/git.rs +++ b/crates/octopush_core/src/git/git.rs @@ -1,7 +1,7 @@ use std::{path::PathBuf, sync::Arc}; use eyre::ContextCompat; -use git2::{AutotagOption, Cred, FetchOptions, PushOptions, RemoteCallbacks, Repository}; +use git2::{Cred, FetchOptions, PushOptions, RemoteCallbacks, Repository}; use tokio::sync::Mutex; use crate::storage::DynStorageEngine; diff --git a/crates/octopush_core/src/schema/parser.rs b/crates/octopush_core/src/schema/parser.rs index 7bc714c..7737a32 100644 --- a/crates/octopush_core/src/schema/parser.rs +++ b/crates/octopush_core/src/schema/parser.rs @@ -34,36 +34,3 @@ impl DefaultSchemaParser { 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() - }] - } - ) - } -}