From 91c7a3e66f16f42816784817017408b6b35fb585 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 8 Nov 2022 12:07:46 +0800 Subject: [PATCH] Fix tests on migrations (#21705) --- models/migrations/v1_19/main_test.go | 15 +++++++++++++++ models/migrations/v1_19/v233_test.go | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 models/migrations/v1_19/main_test.go diff --git a/models/migrations/v1_19/main_test.go b/models/migrations/v1_19/main_test.go new file mode 100644 index 0000000000..8ba7fcaf10 --- /dev/null +++ b/models/migrations/v1_19/main_test.go @@ -0,0 +1,15 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package v1_19 // nolint + +import ( + "testing" + + "code.gitea.io/gitea/models/migrations/base" +) + +func TestMain(m *testing.M) { + base.MainTest(m) +} diff --git a/models/migrations/v1_19/v233_test.go b/models/migrations/v1_19/v233_test.go index f0a44df8cb..dd810feef2 100644 --- a/models/migrations/v1_19/v233_test.go +++ b/models/migrations/v1_19/v233_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/assert" ) -func Test_addHeaderAuthorizationEncryptedColWebhook(t *testing.T) { +func Test_AddHeaderAuthorizationEncryptedColWebhook(t *testing.T) { // Create Webhook table type Webhook struct { ID int64 `xorm:"pk autoincr"`