@@ -27,6 +27,7 @@ func transformByteLiterals(t *testing.T, db *BaseDB, query string) string {
27
27
return query
28
28
}
29
29
30
+ // TestMigrationSteps is an example test that illustrates how to test database
30
31
// migrations by selectively applying only some migrations, inserting dummy data
31
32
// and then applying the remaining migrations.
32
33
func TestMigrationSteps (t * testing.T ) {
@@ -330,24 +331,25 @@ func TestMigration29(t *testing.T) {
330
331
// Check universe_roots: the dummy row should keep its original
331
332
// proof_type.
332
333
var proofType string
333
- err = db .QueryRowContext (ctx ,
334
- "SELECT proof_type FROM universe_roots WHERE id = 1" ).Scan (
335
- & proofType ,
336
- )
334
+ err = db .QueryRowContext (ctx , `
335
+ SELECT proof_type FROM universe_roots WHERE id = 1
336
+ ` ).Scan (& proofType )
337
337
require .NoError (t , err )
338
338
require .Equal (t , "issuance" , proofType )
339
339
340
340
// Check federation_global_sync_config dummy data.
341
- err = db .QueryRowContext (ctx ,
342
- `SELECT proof_type
343
- FROM federation_global_sync_config LIMIT 1` ).Scan (& proofType )
341
+ err = db .QueryRowContext (ctx , `
342
+ SELECT proof_type
343
+ FROM federation_global_sync_config LIMIT 1
344
+ ` ).Scan (& proofType )
344
345
require .NoError (t , err )
345
346
require .Equal (t , "transfer" , proofType )
346
347
347
348
// Check federation_uni_sync_config dummy data.
348
- err = db .QueryRowContext (ctx ,
349
- `SELECT proof_type
350
- FROM federation_uni_sync_config LIMIT 1` ).Scan (& proofType )
349
+ err = db .QueryRowContext (ctx , `
350
+ SELECT proof_type
351
+ FROM federation_uni_sync_config LIMIT 1
352
+ ` ).Scan (& proofType )
351
353
require .NoError (t , err )
352
354
require .Equal (t , "issuance" , proofType )
353
355
0 commit comments