mappjzc commented on code in PR #4490:
URL: 
https://github.com/apache/incubator-devlake/pull/4490#discussion_r1115373718


##########
backend/plugins/bamboo/e2e/job_build_test.go:
##########
@@ -0,0 +1,105 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package e2e
+
+import (
+       "testing"
+
+       "github.com/apache/incubator-devlake/core/models/common"
+       "github.com/apache/incubator-devlake/core/models/domainlayer/devops"
+       "github.com/apache/incubator-devlake/helpers/e2ehelper"
+       "github.com/apache/incubator-devlake/plugins/bamboo/impl"
+       "github.com/apache/incubator-devlake/plugins/bamboo/models"
+       "github.com/apache/incubator-devlake/plugins/bamboo/tasks"
+)
+
+func TestBambooJobBuildDataFlow(t *testing.T) {
+
+       var bamboo impl.Bamboo
+       dataflowTester := e2ehelper.NewDataFlowTester(t, "bamboo", bamboo)
+
+       taskData := &tasks.BambooTaskData{
+               Options: &tasks.BambooOptions{
+                       ConnectionId: 3,
+                       ProjectKey:   "TEST1",
+                       BambooTransformationRule: 
&models.BambooTransformationRule{
+                               DeploymentPattern: "(?i)compile",
+                               ProductionPattern: "(?i)compile",
+                       },
+               },
+       }
+       // import raw data table
+       // SELECT * FROM _raw_bamboo_api_job_build INTO OUTFILE 
"/tmp/_raw_bamboo_api_job_build.csv" FIELDS TERMINATED BY ',' OPTIONALLY 
ENCLOSED BY '"' LINES TERMINATED BY '\r\n';
+       
dataflowTester.ImportCsvIntoRawTable("./raw_tables/_raw_bamboo_api_job_build.csv",
 "_raw_bamboo_api_job_build")
+
+       // verify extraction
+       dataflowTester.FlushTabler(&models.BambooJobBuild{})
+       dataflowTester.Subtask(tasks.ExtractJobBuildMeta, taskData)
+       dataflowTester.VerifyTable(
+               models.BambooJobBuild{},
+               "./snapshot_tables/_tool_bamboo_job_builds.csv",
+               e2ehelper.ColumnWithRawData(

Review Comment:
   There are 187 e2e test use VerifyTable but 59 e2e test use 
VerifyTableWithOptions.
   we would better to fix all of it in the same pr.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to