mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 07:20:07 -05:00 
			
		
		
		
	Move some files into models' sub packages (#20262)
* Move some files into models' sub packages * Move functions * merge main branch * Fix check * fix check * Fix some tests * Fix lint * Fix lint * Revert lint changes * Fix error comments * Fix lint Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		@@ -2,12 +2,13 @@
 | 
			
		||||
// Use of this source code is governed by a MIT-style
 | 
			
		||||
// license that can be found in the LICENSE file.
 | 
			
		||||
 | 
			
		||||
package auth
 | 
			
		||||
package auth_test
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"strings"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	auth_model "code.gitea.io/gitea/models/auth"
 | 
			
		||||
	"code.gitea.io/gitea/models/db"
 | 
			
		||||
	"code.gitea.io/gitea/models/unittest"
 | 
			
		||||
	"code.gitea.io/gitea/modules/json"
 | 
			
		||||
@@ -37,13 +38,13 @@ func (source *TestSource) ToDB() ([]byte, error) {
 | 
			
		||||
func TestDumpAuthSource(t *testing.T) {
 | 
			
		||||
	assert.NoError(t, unittest.PrepareTestDatabase())
 | 
			
		||||
 | 
			
		||||
	authSourceSchema, err := db.TableInfo(new(Source))
 | 
			
		||||
	authSourceSchema, err := db.TableInfo(new(auth_model.Source))
 | 
			
		||||
	assert.NoError(t, err)
 | 
			
		||||
 | 
			
		||||
	RegisterTypeConfig(OAuth2, new(TestSource))
 | 
			
		||||
	auth_model.RegisterTypeConfig(auth_model.OAuth2, new(TestSource))
 | 
			
		||||
 | 
			
		||||
	CreateSource(&Source{
 | 
			
		||||
		Type:     OAuth2,
 | 
			
		||||
	auth_model.CreateSource(&auth_model.Source{
 | 
			
		||||
		Type:     auth_model.OAuth2,
 | 
			
		||||
		Name:     "TestSource",
 | 
			
		||||
		IsActive: false,
 | 
			
		||||
		Cfg: &TestSource{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user