File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2025 The Gitea Authors. All rights reserved.
2+ // SPDX-License-Identifier: MIT
3+
4+ package v1_24 //nolint
5+
6+ import (
7+ "testing"
8+
9+ "code.gitea.io/gitea/models/migrations/base"
10+ )
11+
12+ func TestMain (m * testing.M ) {
13+ base .MainTest (m )
14+ }
Original file line number Diff line number Diff line change 1+ // Copyright 2025 The Gitea Authors. All rights reserved.
2+ // SPDX-License-Identifier: MIT
3+
4+ package v1_24 //nolint
5+
6+ import (
7+ "testing"
8+
9+ "code.gitea.io/gitea/models/migrations/base"
10+ "github.com/stretchr/testify/assert"
11+ )
12+
13+ func Test_Ini2UI (t * testing.T ) {
14+ // Prepare and load the testing database
15+ x , deferable := base .PrepareTestEnv (t , 0 )
16+ defer deferable ()
17+ if x == nil || t .Failed () {
18+ return
19+ }
20+
21+ assert .NoError (t , MigrateIniToDatabase (x ))
22+
23+ cnt , err := x .Table ("system_setting" ).Where (`setting_key LIKE "ui.%"` ).Count ()
24+ assert .NoError (t , err )
25+ assert .EqualValues (t , 23 , cnt )
26+ }
You can’t perform that action at this time.
0 commit comments