MCPcopy
hub / github.com/apache/devlake / TestNullableFlow

Function TestNullableFlow

backend/helpers/e2ehelper/nullable_test.go:24–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22)
23
24func TestNullableFlow(t *testing.T) {
25 dataflowTester := NewDataFlowTester(t, "", nil)
26
27 // nullable as false
28 dataflowTester.ImportCsvIntoTabler("./testdata/issue_changelogs.csv", &nullStringTest{})
29 dataflowTester.VerifyTableWithOptions(
30 &nullStringTest{},
31 TableOptions{
32 CSVRelPath: "./testdata/issue_changelogs.csv",
33 TargetFields: ColumnWithRawData(
34 "id",
35 "issue_id",
36 "author_id",
37 "author_name",
38 "field_id",
39 "field_name",
40 "original_from_value",
41 "original_to_value",
42 "from_value",
43 "to_value",
44 "created_date",
45 "_raw_data_params",
46 "_raw_data_table",
47 "_raw_data_id",
48 "_raw_data_remark",
49 ),
50 },
51 )
52 // nullable as true
53 dataflowTester.ImportNullableCsvIntoTabler("./testdata/issue_changelogs.csv", &nullStringTest{})
54 dataflowTester.VerifyTableWithOptions(
55 &nullStringTest{},
56 TableOptions{
57 Nullable: true,
58 CSVRelPath: "./testdata/issue_changelogs.csv",
59 TargetFields: ColumnWithRawData(
60 "id",
61 "issue_id",
62 "author_id",
63 "author_name",
64 "field_id",
65 "field_name",
66 "original_from_value",
67 "original_to_value",
68 "from_value",
69 "to_value",
70 "created_date",
71 "_raw_data_params",
72 "_raw_data_table",
73 "_raw_data_id",
74 "_raw_data_remark",
75 ),
76 },
77 )
78}

Callers

nothing calls this directly

Calls 5

ImportCsvIntoTablerMethod · 0.95
NewDataFlowTesterFunction · 0.85
ColumnWithRawDataFunction · 0.85

Tested by

no test coverage detected