Skip to content

Commit 30d594d

Browse files
committed
amend tests related to committer and author
1 parent ad3d57d commit 30d594d

3 files changed

Lines changed: 60 additions & 3 deletions

File tree

server/tables/dtables/diff.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ func getUnscopedDoltDiffSchema(dbName, tableName string) sql.Schema {
3131
{Name: "message", Type: pgtypes.Text, Source: tableName, PrimaryKey: false, DatabaseSource: dbName},
3232
{Name: "data_change", Type: pgtypes.Bool, Source: tableName, PrimaryKey: false, DatabaseSource: dbName},
3333
{Name: "schema_change", Type: pgtypes.Bool, Source: tableName, PrimaryKey: false, DatabaseSource: dbName},
34+
{Name: "author", Type: pgtypes.Text, Source: tableName, PrimaryKey: false, DatabaseSource: dbName},
35+
{Name: "author_email", Type: pgtypes.Text, Source: tableName, PrimaryKey: false, DatabaseSource: dbName},
36+
{Name: "author_date", Type: pgtypes.Timestamp, Source: tableName, PrimaryKey: false, DatabaseSource: dbName},
3437
}
3538
}
3639

testing/go/dolt_functions_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,7 @@ func TestDoltFunctionSmokeTests(t *testing.T) {
28622862
{
28632863
Query: "SELECT * FROM dolt.diff",
28642864
Expected: []sql.Row{
2865-
{"WORKING", "public.t1", nil, nil, nil, nil, "t", "t"},
2865+
{"WORKING", "public.t1", nil, nil, nil, nil, "t", "t", nil, nil, nil},
28662866
},
28672867
},
28682868
{
@@ -2978,8 +2978,8 @@ func TestDoltFunctionSmokeTests(t *testing.T) {
29782978
{
29792979
Query: "SELECT * FROM dolt.diff",
29802980
Expected: []sql.Row{
2981-
{"WORKING", "public.t1", nil, nil, nil, nil, "t", "t"},
2982-
{"WORKING", "testschema.t2", nil, nil, nil, nil, "t", "t"},
2981+
{"WORKING", "public.t1", nil, nil, nil, nil, "t", "t", nil, nil, nil},
2982+
{"WORKING", "testschema.t2", nil, nil, nil, nil, "t", "t", nil, nil, nil},
29832983
},
29842984
},
29852985
{

testing/go/pgcatalog_test.go

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5528,6 +5528,9 @@ WHERE pg_catalog.pg_class.relkind = ANY (ARRAY['r', 'p', 'f', 'v', 'm']) AND pg_
55285528
{"date", "timestamp without time zone", nil, "t", "dolt_log", nil, "", nil},
55295529
{"message", "text", nil, "t", "dolt_log", nil, "", nil},
55305530
{"commit_order", "numeric", nil, "t", "dolt_log", nil, "", nil},
5531+
{"author", "text", nil, "t", "dolt_log", nil, "", nil},
5532+
{"author_email", "text", nil, "t", "dolt_log", nil, "", nil},
5533+
{"author_date", "timestamp without time zone", nil, "t", "dolt_log", nil, "", nil},
55315534
},
55325535
},
55335536
},
@@ -5598,6 +5601,9 @@ JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_type
55985601
{"date", "timestamp without time zone", nil, "t", "dolt_log", nil, "", nil},
55995602
{"message", "text", nil, "t", "dolt_log", nil, "", nil},
56005603
{"commit_order", "numeric", nil, "t", "dolt_log", nil, "", nil},
5604+
{"author", "text", nil, "t", "dolt_log", nil, "", nil},
5605+
{"author_email", "text", nil, "t", "dolt_log", nil, "", nil},
5606+
{"author_date", "timestamp without time zone", nil, "t", "dolt_log", nil, "", nil},
56015607
},
56025608
},
56035609
},
@@ -5994,6 +6000,9 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
59946000
{148630507, "latest_committer_email", 25, 4, "f", "f", "f"},
59956001
{148630507, "latest_commit_date", 1114, 5, "f", "f", "f"},
59966002
{148630507, "latest_commit_message", 25, 6, "f", "f", "f"},
6003+
{148630507, "latest_author", 25, 7, "f", "f", "f"},
6004+
{148630507, "latest_author_email", 25, 8, "f", "f", "f"},
6005+
{148630507, "latest_author_date", 1114, 9, "f", "f", "f"},
59976006
{225426095, "table_name", 25, 1, "t", "f", "f"},
59986007
{225426095, "base_schema", 25, 2, "t", "f", "f"},
59996008
{225426095, "our_schema", 25, 3, "t", "f", "f"},
@@ -6018,6 +6027,9 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
60186027
{398111247, "remote", 25, 7, "f", "f", "f"},
60196028
{398111247, "branch", 25, 8, "f", "f", "f"},
60206029
{398111247, "dirty", 16, 9, "f", "f", "f"},
6030+
{398111247, "latest_author", 25, 10, "f", "f", "f"},
6031+
{398111247, "latest_author_email", 25, 11, "f", "f", "f"},
6032+
{398111247, "latest_author_date", 1114, 12, "f", "f", "f"},
60216033
{458530874, "name", 25, 1, "t", "f", "f"},
60226034
{458530874, "hash", 25, 2, "t", "f", "f"},
60236035
{458530874, "latest_committer", 25, 3, "f", "f", "f"},
@@ -6027,6 +6039,9 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
60276039
{458530874, "remote", 25, 7, "f", "f", "f"},
60286040
{458530874, "branch", 25, 8, "f", "f", "f"},
60296041
{458530874, "dirty", 16, 9, "f", "f", "f"},
6042+
{458530874, "latest_author", 25, 10, "f", "f", "f"},
6043+
{458530874, "latest_author_email", 25, 11, "f", "f", "f"},
6044+
{458530874, "latest_author_date", 1114, 12, "f", "f", "f"},
60306045
{604995978, "is_merging", 16, 1, "t", "f", "f"},
60316046
{604995978, "source", 25, 2, "f", "f", "f"},
60326047
{604995978, "source_commit", 25, 3, "f", "f", "f"},
@@ -6046,12 +6061,18 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
60466061
{649632770, "message", 25, 6, "t", "f", "f"},
60476062
{649632770, "data_change", 16, 7, "t", "f", "f"},
60486063
{649632770, "schema_change", 16, 8, "t", "f", "f"},
6064+
{649632770, "author", 25, 9, "t", "f", "f"},
6065+
{649632770, "author_email", 25, 10, "t", "f", "f"},
6066+
{649632770, "author_date", 1114, 11, "t", "f", "f"},
60496067
{867423409, "name", 25, 1, "t", "f", "f"},
60506068
{867423409, "hash", 25, 2, "t", "f", "f"},
60516069
{867423409, "latest_committer", 25, 3, "f", "f", "f"},
60526070
{867423409, "latest_committer_email", 25, 4, "f", "f", "f"},
60536071
{867423409, "latest_commit_date", 1114, 5, "f", "f", "f"},
60546072
{867423409, "latest_commit_message", 25, 6, "f", "f", "f"},
6073+
{867423409, "latest_author", 25, 7, "f", "f", "f"},
6074+
{867423409, "latest_author_email", 25, 8, "f", "f", "f"},
6075+
{867423409, "latest_author_date", 1114, 9, "f", "f", "f"},
60556076
{876336553, "to_pk", 23, 1, "f", "f", "f"},
60566077
{876336553, "to_v1", 23, 2, "f", "f", "f"},
60576078
{876336553, "to_commit", 25, 3, "f", "f", "f"},
@@ -6067,12 +6088,18 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
60676088
{887648921, "latest_committer_email", 25, 4, "f", "f", "f"},
60686089
{887648921, "latest_commit_date", 1114, 5, "f", "f", "f"},
60696090
{887648921, "latest_commit_message", 25, 6, "f", "f", "f"},
6091+
{887648921, "latest_author", 25, 7, "f", "f", "f"},
6092+
{887648921, "latest_author_email", 25, 8, "f", "f", "f"},
6093+
{887648921, "latest_author_date", 1114, 9, "f", "f", "f"},
60706094
{909123395, "commit_hash", 25, 1, "t", "f", "f"},
60716095
{909123395, "committer", 25, 2, "t", "f", "f"},
60726096
{909123395, "email", 25, 3, "t", "f", "f"},
60736097
{909123395, "date", 1114, 4, "t", "f", "f"},
60746098
{909123395, "message", 25, 5, "t", "f", "f"},
60756099
{909123395, "commit_order", 1700, 6, "t", "f", "f"},
6100+
{909123395, "author", 25, 7, "t", "f", "f"},
6101+
{909123395, "author_email", 25, 8, "t", "f", "f"},
6102+
{909123395, "author_date", 1114, 9, "t", "f", "f"},
60766103
{1060579466, "table_name", 25, 1, "t", "f", "f"},
60776104
{1060579466, "staged", 16, 2, "t", "f", "f"},
60786105
{1060579466, "status", 25, 3, "t", "f", "f"},
@@ -6087,6 +6114,9 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
60876114
{1212681264, "date", 1114, 6, "t", "f", "f"},
60886115
{1212681264, "message", 25, 7, "t", "f", "f"},
60896116
{1212681264, "diff_type", 25, 8, "t", "f", "f"},
6117+
{1212681264, "author", 25, 9, "t", "f", "f"},
6118+
{1212681264, "author_email", 25, 10, "t", "f", "f"},
6119+
{1212681264, "author_date", 1114, 11, "t", "f", "f"},
60906120
{1218627310, "table", 25, 1, "t", "f", "f"},
60916121
{1218627310, "num_conflicts", 1700, 2, "t", "f", "f"},
60926122
{1227149778, "table_name", 25, 1, "t", "f", "f"},
@@ -6127,6 +6157,9 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
61276157
{1763579892, "remote", 25, 7, "f", "f", "f"},
61286158
{1763579892, "branch", 25, 8, "f", "f", "f"},
61296159
{1763579892, "dirty", 16, 9, "f", "f", "f"},
6160+
{1763579892, "latest_author", 25, 10, "f", "f", "f"},
6161+
{1763579892, "latest_author_email", 25, 11, "f", "f", "f"},
6162+
{1763579892, "latest_author_date", 1114, 12, "f", "f", "f"},
61306163
{1807684176, "tag_name", 25, 1, "t", "f", "f"},
61316164
{1807684176, "tag_hash", 25, 2, "t", "f", "f"},
61326165
{1807684176, "tagger", 25, 3, "t", "f", "f"},
@@ -6145,12 +6178,18 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
61456178
{2056815203, "date", 1114, 6, "t", "f", "f"},
61466179
{2056815203, "message", 25, 7, "t", "f", "f"},
61476180
{2056815203, "diff_type", 25, 8, "t", "f", "f"},
6181+
{2056815203, "author", 25, 9, "t", "f", "f"},
6182+
{2056815203, "author_email", 25, 10, "t", "f", "f"},
6183+
{2056815203, "author_date", 1114, 11, "t", "f", "f"},
61486184
{2067982358, "commit_hash", 25, 1, "t", "f", "f"},
61496185
{2067982358, "committer", 25, 2, "t", "f", "f"},
61506186
{2067982358, "email", 25, 3, "t", "f", "f"},
61516187
{2067982358, "date", 1114, 4, "t", "f", "f"},
61526188
{2067982358, "message", 25, 5, "t", "f", "f"},
61536189
{2067982358, "commit_order", 1700, 6, "t", "f", "f"},
6190+
{2067982358, "author", 25, 7, "t", "f", "f"},
6191+
{2067982358, "author_email", 25, 8, "t", "f", "f"},
6192+
{2067982358, "author_date", 1114, 9, "t", "f", "f"},
61546193
{2357712556, "commit_hash", 25, 1, "t", "f", "f"},
61556194
{2357712556, "table_name", 25, 2, "t", "f", "f"},
61566195
{2357712556, "committer", 25, 3, "t", "f", "f"},
@@ -6159,6 +6198,9 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
61596198
{2357712556, "message", 25, 6, "t", "f", "f"},
61606199
{2357712556, "data_change", 16, 7, "t", "f", "f"},
61616200
{2357712556, "schema_change", 16, 8, "t", "f", "f"},
6201+
{2357712556, "author", 25, 9, "t", "f", "f"},
6202+
{2357712556, "author_email", 25, 10, "t", "f", "f"},
6203+
{2357712556, "author_date", 1114, 11, "t", "f", "f"},
61626204
{2419641880, "from_root_ish", 25, 1, "f", "f", "f"},
61636205
{2419641880, "base_pk", 23, 2, "f", "f", "f"},
61646206
{2419641880, "base_v1", 23, 3, "f", "f", "f"},
@@ -6178,11 +6220,17 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
61786220
{3112353516, "email", 25, 3, "t", "f", "f"},
61796221
{3112353516, "date", 1114, 4, "t", "f", "f"},
61806222
{3112353516, "message", 25, 5, "t", "f", "f"},
6223+
{3112353516, "author", 25, 6, "t", "f", "f"},
6224+
{3112353516, "author_email", 25, 7, "t", "f", "f"},
6225+
{3112353516, "author_date", 1114, 8, "t", "f", "f"},
61816226
{3152041833, "commit_hash", 25, 1, "t", "f", "f"},
61826227
{3152041833, "committer", 25, 2, "t", "f", "f"},
61836228
{3152041833, "email", 25, 3, "t", "f", "f"},
61846229
{3152041833, "date", 1114, 4, "t", "f", "f"},
61856230
{3152041833, "message", 25, 5, "t", "f", "f"},
6231+
{3152041833, "author", 25, 6, "t", "f", "f"},
6232+
{3152041833, "author_email", 25, 7, "t", "f", "f"},
6233+
{3152041833, "author_date", 1114, 8, "t", "f", "f"},
61866234
{3210116770, "table_name", 25, 1, "t", "f", "f"},
61876235
{3210116770, "base_schema", 25, 2, "t", "f", "f"},
61886236
{3210116770, "our_schema", 25, 3, "t", "f", "f"},
@@ -6213,6 +6261,9 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
62136261
{3425483043, "email", 25, 3, "t", "f", "f"},
62146262
{3425483043, "date", 1114, 4, "t", "f", "f"},
62156263
{3425483043, "message", 25, 5, "t", "f", "f"},
6264+
{3425483043, "author", 25, 6, "t", "f", "f"},
6265+
{3425483043, "author_email", 25, 7, "t", "f", "f"},
6266+
{3425483043, "author_date", 1114, 8, "t", "f", "f"},
62166267
{3431637196, "table_name", 25, 1, "t", "f", "f"},
62176268
{3431637196, "staged", 16, 2, "t", "f", "f"},
62186269
{3431637196, "status", 25, 3, "t", "f", "f"},
@@ -6222,6 +6273,9 @@ func TestSystemTablesInPgcatalog(t *testing.T) {
62226273
{3491847678, "date", 1114, 4, "t", "f", "f"},
62236274
{3491847678, "message", 25, 5, "t", "f", "f"},
62246275
{3491847678, "commit_order", 1700, 6, "t", "f", "f"},
6276+
{3491847678, "author", 25, 7, "t", "f", "f"},
6277+
{3491847678, "author_email", 25, 8, "t", "f", "f"},
6278+
{3491847678, "author_date", 1114, 9, "t", "f", "f"},
62256279
{3554775706, "table_name", 25, 1, "t", "f", "f"},
62266280
{3554775706, "staged", 16, 2, "t", "f", "f"},
62276281
{3554775706, "status", 25, 3, "t", "f", "f"},

0 commit comments

Comments
 (0)