Skip to content

Remove duplicated database init function

Related tasks

Context

The gorm package contains database related util functions. One such function is GetDBFromEnvVars, which as the name suggests is in charge of establishing a connection to the testing database using environment variable configuration. There is another function right next to it called GetTestDBFromEnvVars which is an exact copy.

Change

Since both GetDBFromEnvVars and GetTestDBFromEnvVars do the same thing, and the functions connect to the test database, GetDBFromEnvVars has been removed in favor of GetTestDBFromEnvVars. All calls to GetDBFromEnvVars have been replaced with calls to GetTestDBFromEnvVars.

Other information

Additional documentation

Merge request reports