From f73eb4338af4eb7b7d5c474cdc8960509af512de Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 7 Nov 2022 18:58:02 +0800 Subject: [PATCH] Fix tests on migrations --- 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 0000000000000..8ba7fcaf10516 --- /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 f0a44df8cbe1b..dd810feef2895 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"`