@@ -374,14 +374,14 @@ func TestSSLDefaults(t *testing.T) {
374374 t .Run (tt .file , func (t * testing.T ) {
375375 pqtest .Home (t )
376376
377- pqtest .Write (t , []byte ("invalid data" ), pqutil .Home (), tt .file )
377+ pqtest .Write (t , []byte ("invalid data" ), pqutil .Home (true ), tt .file )
378378 if tt .file == "postgresql.crt" {
379- pqtest .Write (t , pqtest .Read (t , "testdata/init/postgresql.key" ), pqutil .Home (), "postgresql.key" )
380- pqtest .Chmod (t , 0o600 , pqutil .Home (), "postgresql.key" )
379+ pqtest .Write (t , pqtest .Read (t , "testdata/init/postgresql.key" ), pqutil .Home (true ), "postgresql.key" )
380+ pqtest .Chmod (t , 0o600 , pqutil .Home (true ), "postgresql.key" )
381381 }
382382 if tt .file == "postgresql.key" {
383- pqtest .Write (t , pqtest .Read (t , "testdata/init/postgresql.crt" ), pqutil .Home (), "postgresql.crt" )
384- pqtest .Chmod (t , 0o600 , pqutil .Home (), "postgresql.key" )
383+ pqtest .Write (t , pqtest .Read (t , "testdata/init/postgresql.crt" ), pqutil .Home (true ), "postgresql.crt" )
384+ pqtest .Chmod (t , 0o600 , pqutil .Home (true ), "postgresql.key" )
385385 }
386386
387387 _ , err := pqtest .DB (t , "user=pqgossl sslmode=require" )
@@ -393,10 +393,10 @@ func TestSSLDefaults(t *testing.T) {
393393
394394 t .Run ("work with default paths" , func (t * testing.T ) {
395395 pqtest .Home (t )
396- pqtest .Write (t , pqtest .Read (t , "testdata/init/root.crt" ), pqutil .Home (), "root.crt" )
397- pqtest .Write (t , pqtest .Read (t , "testdata/init/postgresql.crt" ), pqutil .Home (), "postgresql.crt" )
398- pqtest .Write (t , pqtest .Read (t , "testdata/init/postgresql.key" ), pqutil .Home (), "postgresql.key" )
399- pqtest .Chmod (t , 0o600 , pqutil .Home (), "postgresql.key" )
396+ pqtest .Write (t , pqtest .Read (t , "testdata/init/root.crt" ), pqutil .Home (true ), "root.crt" )
397+ pqtest .Write (t , pqtest .Read (t , "testdata/init/postgresql.crt" ), pqutil .Home (true ), "postgresql.crt" )
398+ pqtest .Write (t , pqtest .Read (t , "testdata/init/postgresql.key" ), pqutil .Home (true ), "postgresql.key" )
399+ pqtest .Chmod (t , 0o600 , pqutil .Home (true ), "postgresql.key" )
400400 _ = pqtest .MustDB (t , "host=postgres user=pqgosslcert sslmode=verify-ca" )
401401 })
402402}
0 commit comments