likyh commented on code in PR #2190:
URL: https://github.com/apache/incubator-devlake/pull/2190#discussion_r897627919


##########
helpers/e2ehelper/data_flow_tester.go:
##########
@@ -71,45 +77,67 @@ func NewDataFlowTester(t *testing.T, pluginName string, 
pluginMeta core.PluginMe
                panic(err)
        }
        cfg := config.GetConfig()
+       e2eDbUrl := cfg.GetString(`E2E_DB_URL`)
+       if e2eDbUrl == `` {
+               panic(fmt.Errorf(`e2e can only run with E2E_DB_URL, please set 
it in .env`))
+       }
+       cfg.Set(`DB_URL`, cfg.GetString(`E2E_DB_URL`))
        db, err := runner.NewGormDb(cfg, logger.Global)
        if err != nil {
                panic(err)
        }
        return &DataFlowTester{
                Cfg:    cfg,
                Db:     db,
+               Dal:    dalgorm.NewDalgorm(db),
                T:      t,
                Name:   pluginName,
                Plugin: pluginMeta,
                Log:    logger.Global,
        }
 }
 
-// ImportCsv imports records from specified csv file into target table, note 
that existing data would be deleted first.
-func (t *DataFlowTester) ImportCsv(csvRelPath string, tableName string) {
+// ImportCsvIntoRawTable imports records from specified csv file into target 
table, note that existing data would be deleted first.
+func (t *DataFlowTester) ImportCsvIntoRawTable(csvRelPath string, tableName 
string) {

Review Comment:
   Raw table only needs name, and other tables need dst, which is the reason 
for the difference 😹 Unless reflection is added to the function. But it either 
cannot say that all string names are raw table.



-- 
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