File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ func newDatabaseWithConfig(config Config) *EmbeddedPostgres {
5252
5353// Start will try to start the configured Postgres process returning an error when there were any problems with invocation.
5454// If any error occurs Start will try to also Stop the Postgres process in order to not leave any sub-process running.
55+ //nolint:funlen
5556func (ep * EmbeddedPostgres ) Start () error {
5657 if ep .started {
5758 return errors .New ("server is already started" )
Original file line number Diff line number Diff line change @@ -346,6 +346,7 @@ func Test_CanStartAndStopTwice(t *testing.T) {
346346 }
347347}
348348
349+ //nolint:funlen
349350func Test_ReuseData (t * testing.T ) {
350351 tempDir , err := ioutil .TempDir ("" , "embedded_postgres_test" )
351352 if err != nil {
@@ -398,9 +399,11 @@ func Test_ReuseData(t *testing.T) {
398399
399400 if rows , err := db .Query ("SELECT * FROM test" ); err != nil {
400401 shutdownDBAndFail (t , err , database )
401- } else if ! rows .Next () {
402- shutdownDBAndFail (t , errors .New ("no row from db" ), database )
403402 } else {
403+ if ! rows .Next () {
404+ shutdownDBAndFail (t , errors .New ("no row from db" ), database )
405+ }
406+
404407 var (
405408 id int64
406409 value string
You can’t perform that action at this time.
0 commit comments