diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-12-10 16:14:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 16:14:24 +0800 |
commit | 3ca5dc7e32b372d14ff80d96f14b8f6a805862f1 (patch) | |
tree | 50d193ed0dacf2888d57b193a9b0d36065aff205 /integrations/api_keys_test.go | |
parent | 0a9fcf63a49799ad3b0f146c54879161bac61e10 (diff) | |
download | gitea-3ca5dc7e32b372d14ff80d96f14b8f6a805862f1.tar.gz gitea-3ca5dc7e32b372d14ff80d96f14b8f6a805862f1.zip |
Move keys to models/asymkey (#17917)
* Move keys to models/keys
* Rename models/keys -> models/asymkey
* change the missed package name
* Fix package alias
* Fix test
* Fix docs
* Fix test
* Fix test
* merge
Diffstat (limited to 'integrations/api_keys_test.go')
-rw-r--r-- | integrations/api_keys_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/integrations/api_keys_test.go b/integrations/api_keys_test.go index 5fbd51318f..b1f455d932 100644 --- a/integrations/api_keys_test.go +++ b/integrations/api_keys_test.go @@ -10,7 +10,7 @@ import ( "net/url" "testing" - "code.gitea.io/gitea/models" + asymkey_model "code.gitea.io/gitea/models/asymkey" "code.gitea.io/gitea/models/perm" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" @@ -65,7 +65,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) { var newDeployKey api.DeployKey DecodeJSON(t, resp, &newDeployKey) - unittest.AssertExistsAndLoadBean(t, &models.DeployKey{ + unittest.AssertExistsAndLoadBean(t, &asymkey_model.DeployKey{ ID: newDeployKey.ID, Name: rawKeyBody.Title, Content: rawKeyBody.Key, @@ -90,7 +90,7 @@ func TestCreateReadWriteDeployKey(t *testing.T) { var newDeployKey api.DeployKey DecodeJSON(t, resp, &newDeployKey) - unittest.AssertExistsAndLoadBean(t, &models.DeployKey{ + unittest.AssertExistsAndLoadBean(t, &asymkey_model.DeployKey{ ID: newDeployKey.ID, Name: rawKeyBody.Title, Content: rawKeyBody.Key, @@ -116,7 +116,7 @@ func TestCreateUserKey(t *testing.T) { var newPublicKey api.PublicKey DecodeJSON(t, resp, &newPublicKey) - unittest.AssertExistsAndLoadBean(t, &models.PublicKey{ + unittest.AssertExistsAndLoadBean(t, &asymkey_model.PublicKey{ ID: newPublicKey.ID, OwnerID: user.ID, Name: rawKeyBody.Title, |