File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,12 @@ import (
1010 "strconv"
1111 "testing"
1212
13+ actions_model "code.gitea.io/gitea/models/actions"
1314 auth_model "code.gitea.io/gitea/models/auth"
1415 "code.gitea.io/gitea/models/unittest"
1516 user_model "code.gitea.io/gitea/models/user"
17+
18+ "github.com/stretchr/testify/assert"
1619)
1720
1821func TestActionsCollaborativeOwner (t * testing.T ) {
@@ -26,7 +29,10 @@ func TestActionsCollaborativeOwner(t *testing.T) {
2629 // a private repo(id=6) of user10 will try to clone "reusable_workflow" repo
2730 user10 := unittest .AssertExistsAndLoadBean (t , & user_model.User {ID : 10 })
2831 // task id is 55 and its repo_id=6
32+ task := unittest .AssertExistsAndLoadBean (t , & actions_model.ActionTask {ID : 55 , RepoID : 6 })
2933 taskToken := "674f727a81ed2f195bccab036cccf86a182199eb"
34+ tokenHash := auth_model .HashToken (taskToken , task .TokenSalt )
35+ assert .Equal (t , task .TokenHash , tokenHash )
3036
3137 dstPath := t .TempDir ()
3238 u .Path = fmt .Sprintf ("%s/%s.git" , repo .Owner .UserName , repo .Name )
You can’t perform that action at this time.
0 commit comments