You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2022/06/23 04:09:17 UTC
[incubator-devlake] 02/03: fix: unit test
This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 6adce05bb8ed0da8c5a5ace4fd845a2a7766e8a8
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Thu Jun 23 10:57:12 2022 +0800
fix: unit test
---
services/blueprint_test.go | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/services/blueprint_test.go b/services/blueprint_test.go
index 32c08331..f4e53848 100644
--- a/services/blueprint_test.go
+++ b/services/blueprint_test.go
@@ -20,36 +20,36 @@ package services
import (
"testing"
- "github.com/apache/incubator-devlake/models"
+ "github.com/apache/incubator-devlake/plugins/core"
"github.com/stretchr/testify/assert"
)
func TestMergePipelineTasks(t *testing.T) {
- plan1 := models.PipelinePlan{
- []*models.NewTask{
+ plan1 := core.PipelinePlan{
+ {
{Plugin: "github"},
{Plugin: "gitlab"},
},
- []*models.NewTask{
+ {
{Plugin: "gitextractor1"},
{Plugin: "gitextractor2"},
},
}
- plan2 := models.PipelinePlan{
- []*models.NewTask{
+ plan2 := core.PipelinePlan{
+ {
{Plugin: "jira"},
},
}
- plan3 := models.PipelinePlan{
- []*models.NewTask{
+ plan3 := core.PipelinePlan{
+ {
{Plugin: "jenkins"},
},
- []*models.NewTask{
+ {
{Plugin: "jenkins"},
},
- []*models.NewTask{
+ {
{Plugin: "jenkins"},
},
}
@@ -58,13 +58,13 @@ func TestMergePipelineTasks(t *testing.T) {
assert.Equal(t, plan2, MergePipelinePlans(plan2))
assert.Equal(
t,
- models.PipelinePlan{
- []*models.NewTask{
+ core.PipelinePlan{
+ {
{Plugin: "github"},
{Plugin: "gitlab"},
{Plugin: "jira"},
},
- []*models.NewTask{
+ {
{Plugin: "gitextractor1"},
{Plugin: "gitextractor2"},
},
@@ -73,19 +73,19 @@ func TestMergePipelineTasks(t *testing.T) {
)
assert.Equal(
t,
- models.PipelinePlan{
- []*models.NewTask{
+ core.PipelinePlan{
+ {
{Plugin: "github"},
{Plugin: "gitlab"},
{Plugin: "jira"},
{Plugin: "jenkins"},
},
- []*models.NewTask{
+ {
{Plugin: "gitextractor1"},
{Plugin: "gitextractor2"},
{Plugin: "jenkins"},
},
- []*models.NewTask{
+ {
{Plugin: "jenkins"},
},
},