@@ -669,7 +669,7 @@ func Test_MaintainUniqueSources_DeleteOldPartitions(t *testing.T) {
669669 r .NoError (err )
670670
671671 t .Run ("MaintainUniqueSources" , func (_ * testing.T ) {
672- // creates an empty metric table and adds
672+ // creates an empty metric table and adds
673673 // an entry to `admin.all_distinct_dbname_metrics`
674674 err = pgw .SyncMetric ("test" , "test_metric_1" , AddOp )
675675 r .NoError (err )
@@ -705,7 +705,8 @@ func Test_MaintainUniqueSources_DeleteOldPartitions(t *testing.T) {
705705 message [0 ].DBName = "test_db_2"
706706 pgw .flush (message )
707707 // explicitly use `public.*` prefix.
708- pgw .sinkDb .Exec (pgw .ctx , "SELECT admin.update_listing_table(metric_table_name => 'public.test_metric_1');" )
708+ _ , err = pgw .sinkDb .Exec (pgw .ctx , "SELECT admin.update_listing_table(metric_table_name => 'public.test_metric_1');" )
709+ a .NoError (err )
709710 // another entry should have been added.
710711 err = conn .QueryRow (ctx , "SELECT count(*) FROM admin.all_distinct_dbname_metrics;" ).Scan (& numOfEntries )
711712 a .NoError (err )
@@ -735,10 +736,10 @@ func Test_MaintainUniqueSources_DeleteOldPartitions(t *testing.T) {
735736 // create the 3rd level time partition with end bound yesterday
736737 _ , err = conn .Exec (ctx ,
737738 fmt .Sprintf (
738- `CREATE TABLE subpartitions.test_metric_2_dbname_time
739- PARTITION OF subpartitions.test_metric_2_dbname
740- FOR VALUES FROM ('%s') TO ('%s')` ,
741- boundStart , boundEnd ),
739+ `CREATE TABLE subpartitions.test_metric_2_dbname_time
740+ PARTITION OF subpartitions.test_metric_2_dbname
741+ FOR VALUES FROM ('%s') TO ('%s')` ,
742+ boundStart , boundEnd ),
742743 )
743744 a .NoError (err )
744745 _ , err = conn .Exec (ctx , "COMMENT ON TABLE subpartitions.test_metric_2_dbname_time IS $$pgwatch-generated-metric-dbname-time-lvl$$" )
0 commit comments