diff --git a/database/pgsql/migrations_test.go b/database/pgsql/migrations/migrations_test.go similarity index 91% rename from database/pgsql/migrations_test.go rename to database/pgsql/migrations/migrations_test.go index e3b2eb30..a324f03f 100644 --- a/database/pgsql/migrations_test.go +++ b/database/pgsql/migrations/migrations_test.go @@ -12,22 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -package pgsql +package migrations_test import ( "testing" + "github.com/coreos/clair/database/pgsql/migrations" + "github.com/coreos/clair/database/pgsql/testutil" _ "github.com/lib/pq" "github.com/remind101/migrate" "github.com/stretchr/testify/require" - - "github.com/coreos/clair/database/pgsql/migrations" ) var userTableCount = `SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname='public'` func TestMigration(t *testing.T) { - db, cleanup := createAndConnectTestDB(t, "TestMigration") + db, cleanup := testutil.CreateAndConnectTestDB(t, "TestMigration") defer cleanup() err := migrate.NewPostgresMigrator(db).Exec(migrate.Up, migrations.Migrations...)