MCPcopy Index your code
hub / github.com/apache/devlake / qaTestCaseHandler

Method qaTestCaseHandler

backend/plugins/customize/service/service.go:507–519  ·  view source on GitHub ↗

qaTestCaseHandler saves a record into the `qa_test_cases` table

(qaProjectId string)

Source from the content-addressed store, hash-verified

505
506// qaTestCaseHandler saves a record into the `qa_test_cases` table
507func (s *Service) qaTestCaseHandler(qaProjectId string) func(record map[string]interface{}) errors.Error {
508 return func(record map[string]interface{}) errors.Error {
509 creatorName, _ := getStringField(record, "creator_name", false)
510 if creatorName != "" {
511 creatorId, _ := s.createOrUpdateAccount(creatorName, qaProjectId)
512 record["creator_id"] = creatorId
513 }
514 // remove fields
515 delete(record, "creator_name")
516 record["qa_project_id"] = qaProjectId
517 return s.dal.CreateWithMap(&qa.QaTestCase{}, record)
518 }
519}
520
521// ImportQaTestCaseExecutions imports csv file to the table `qa_test_case_executions`
522func (s *Service) ImportQaTestCaseExecutions(qaProjectId string, file io.ReadCloser, incremental bool) errors.Error {

Callers 1

ImportQaTestCasesMethod · 0.95

Calls 3

createOrUpdateAccountMethod · 0.95
getStringFieldFunction · 0.70
CreateWithMapMethod · 0.65

Tested by

no test coverage detected