(t *testing.T)
| 28 | ) |
| 29 | |
| 30 | func TestTapdBugCommitDataFlow(t *testing.T) { |
| 31 | |
| 32 | var tapd impl.Tapd |
| 33 | dataflowTester := e2ehelper.NewDataFlowTester(t, "tapd", tapd) |
| 34 | |
| 35 | taskData := &tasks.TapdTaskData{ |
| 36 | Options: &tasks.TapdOptions{ |
| 37 | ConnectionId: 1, |
| 38 | WorkspaceId: 991, |
| 39 | }, |
| 40 | } |
| 41 | |
| 42 | // bug status |
| 43 | // import raw data table |
| 44 | dataflowTester.ImportCsvIntoRawTable("./raw_tables/_raw_tapd_api_bug_commits.csv", |
| 45 | "_raw_tapd_api_bug_commits") |
| 46 | // verify extraction |
| 47 | dataflowTester.FlushTabler(&models.TapdBugCommit{}) |
| 48 | dataflowTester.Subtask(tasks.ExtractBugCommitMeta, taskData) |
| 49 | dataflowTester.VerifyTable( |
| 50 | models.TapdBugCommit{}, |
| 51 | "./snapshot_tables/_tool_tapd_bug_commits.csv", |
| 52 | e2ehelper.ColumnWithRawData( |
| 53 | "connection_id", |
| 54 | "id", |
| 55 | "user_id", |
| 56 | "hook_user_name", |
| 57 | "commit_id", |
| 58 | "workspace_id", |
| 59 | "message", |
| 60 | "path", |
| 61 | "web_url", |
| 62 | "hook_project_name", |
| 63 | "ref", |
| 64 | "ref_status", |
| 65 | "git_env", |
| 66 | "file_commit", |
| 67 | "commit_time", |
| 68 | "created", |
| 69 | "bug_id", |
| 70 | "issue_updated", |
| 71 | ), |
| 72 | ) |
| 73 | |
| 74 | dataflowTester.FlushTabler(&crossdomain.IssueCommit{}) |
| 75 | dataflowTester.FlushTabler(&crossdomain.IssueRepoCommit{}) |
| 76 | dataflowTester.Subtask(tasks.ConvertBugCommitMeta, taskData) |
| 77 | dataflowTester.VerifyTable( |
| 78 | crossdomain.IssueCommit{}, |
| 79 | "./snapshot_tables/issue_commits_bug.csv", |
| 80 | e2ehelper.ColumnWithRawData( |
| 81 | "issue_id", |
| 82 | "commit_sha", |
| 83 | ), |
| 84 | ) |
| 85 | dataflowTester.VerifyTableWithOptions(crossdomain.IssueRepoCommit{}, e2ehelper.TableOptions{ |
| 86 | CSVRelPath: "./snapshot_tables/issue_repo_commits_bug.csv", |
| 87 | IgnoreTypes: []interface{}{common.NoPKModel{}}, |
nothing calls this directly
no test coverage detected