@@ -220,13 +220,13 @@ func (s PeerFlowE2ETestSuitePG) Test_PG_Schema_Dump_And_CDC() {
220220 EnvWaitFor (s .t , env , 3 * time .Minute , "initial load parent" , func () bool {
221221 var count int64
222222 err := dstConn .QueryRow (s .t .Context (),
223- fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , dstParent ) ).Scan (& count )
223+ "SELECT COUNT(*) FROM " + dstParent ).Scan (& count )
224224 return err == nil && count == 5
225225 })
226226 EnvWaitFor (s .t , env , 3 * time .Minute , "initial load child" , func () bool {
227227 var count int64
228228 err := dstConn .QueryRow (s .t .Context (),
229- fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , dstChild ) ).Scan (& count )
229+ "SELECT COUNT(*) FROM " + dstChild ).Scan (& count )
230230 return err == nil && count == 10
231231 })
232232
@@ -306,29 +306,29 @@ func (s PeerFlowE2ETestSuitePG) Test_PG_Schema_Dump_And_CDC() {
306306 EnvWaitFor (s .t , env , 3 * time .Minute , "cdc parent rows" , func () bool {
307307 var count int64
308308 err := dstConn .QueryRow (s .t .Context (),
309- fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , dstParent ) ).Scan (& count )
309+ "SELECT COUNT(*) FROM " + dstParent ).Scan (& count )
310310 return err == nil && count == 8
311311 })
312312 EnvWaitFor (s .t , env , 3 * time .Minute , "cdc child rows" , func () bool {
313313 var count int64
314314 err := dstConn .QueryRow (s .t .Context (),
315- fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , dstChild ) ).Scan (& count )
315+ "SELECT COUNT(*) FROM " + dstChild ).Scan (& count )
316316 return err == nil && count == 15
317317 })
318318
319319 // verify data integrity: compare actual row content
320320 // query source and destination and compare
321321 var srcParentCount , dstParentCount int64
322- err = srcConn .QueryRow (s .t .Context (), fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , srcParent ) ).Scan (& srcParentCount )
322+ err = srcConn .QueryRow (s .t .Context (), "SELECT COUNT(*) FROM " + srcParent ).Scan (& srcParentCount )
323323 require .NoError (s .t , err )
324- err = dstConn .QueryRow (s .t .Context (), fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , dstParent ) ).Scan (& dstParentCount )
324+ err = dstConn .QueryRow (s .t .Context (), "SELECT COUNT(*) FROM " + dstParent ).Scan (& dstParentCount )
325325 require .NoError (s .t , err )
326326 require .Equal (s .t , srcParentCount , dstParentCount , "parent table row counts should match" )
327327
328328 var srcChildCount , dstChildCount int64
329- err = srcConn .QueryRow (s .t .Context (), fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , srcChild ) ).Scan (& srcChildCount )
329+ err = srcConn .QueryRow (s .t .Context (), "SELECT COUNT(*) FROM " + srcChild ).Scan (& srcChildCount )
330330 require .NoError (s .t , err )
331- err = dstConn .QueryRow (s .t .Context (), fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , dstChild ) ).Scan (& dstChildCount )
331+ err = dstConn .QueryRow (s .t .Context (), "SELECT COUNT(*) FROM " + dstChild ).Scan (& dstChildCount )
332332 require .NoError (s .t , err )
333333 require .Equal (s .t , srcChildCount , dstChildCount , "child table row counts should match" )
334334
@@ -358,7 +358,8 @@ func (s PeerFlowE2ETestSuitePG) Test_PG_Schema_Dump_No_Owner_No_Privileges() {
358358 dstConnStr := fmt .Sprintf ("host=%s port=%d user=%s password=%s dbname=%s" ,
359359 dstCfg .Host , dstCfg .Port , dstCfg .User , dstCfg .Password , dstCfg .Database )
360360 dstConn , err := pgx .Connect (s .t .Context (), dstConnStr )
361- require .NoError (s .t , err , "failed to connect to secondary postgres on %s:%d (is the postgres2 tilt resource running?)" , dstCfg .Host , dstCfg .Port )
361+ require .NoError (s .t , err , "failed to connect to secondary postgres on %s:%d (postgres2 tilt resource running?)" ,
362+ dstCfg .Host , dstCfg .Port )
362363 s .t .Cleanup (func () { dstConn .Close (s .t .Context ()) })
363364
364365 // sanity: role must not exist on destination
@@ -436,7 +437,7 @@ func (s PeerFlowE2ETestSuitePG) Test_PG_Schema_Dump_No_Owner_No_Privileges() {
436437 EnvWaitFor (s .t , env , 3 * time .Minute , "initial load owned_tbl" , func () bool {
437438 var count int64
438439 err := dstConn .QueryRow (s .t .Context (),
439- fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , qualified ) ).Scan (& count )
440+ "SELECT COUNT(*) FROM " + qualified ).Scan (& count )
440441 return err == nil && count == 5
441442 })
442443
@@ -451,7 +452,7 @@ func (s PeerFlowE2ETestSuitePG) Test_PG_Schema_Dump_No_Owner_No_Privileges() {
451452 EnvWaitFor (s .t , env , 3 * time .Minute , "cdc owned_tbl" , func () bool {
452453 var count int64
453454 err := dstConn .QueryRow (s .t .Context (),
454- fmt . Sprintf ( "SELECT COUNT(*) FROM %s" , qualified ) ).Scan (& count )
455+ "SELECT COUNT(*) FROM " + qualified ).Scan (& count )
455456 return err == nil && count == 10
456457 })
457458
0 commit comments