summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-11-08 12:07:46 +0800
committerGitHub <noreply@github.com>2022-11-08 12:07:46 +0800
commit91c7a3e66f16f42816784817017408b6b35fb585 (patch)
treeb79b1d8f6b43ae2c7fe7cde128bdb8c3a63c1a6e
parent8c1d9885e5360111400bd4fb729f743065037d69 (diff)
downloadgitea-91c7a3e66f16f42816784817017408b6b35fb585.tar.gz
gitea-91c7a3e66f16f42816784817017408b6b35fb585.zip
Fix tests on migrations (#21705)
-rw-r--r--models/migrations/v1_19/main_test.go15
-rw-r--r--models/migrations/v1_19/v233_test.go2
2 files changed, 16 insertions, 1 deletions
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"`