1
0
Fork 0
forked from forgejo/forgejo

[CLI] implement forgejo-cli actions generate-runner-token

(cherry picked from commit 08be2b226e)
This commit is contained in:
Earl Warren 2023-07-09 14:52:41 +02:00
parent 51b9c9092e
commit b6cfa88c6e
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 88 additions and 4 deletions

View file

@ -0,0 +1,22 @@
// SPDX-License-Identifier: MIT
package integration
import (
"net/url"
"testing"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/test"
"github.com/stretchr/testify/assert"
)
func Test_CmdForgejo_Actions(t *testing.T) {
onGiteaRun(t, func(*testing.T, *url.URL) {
defer test.MockVariable(&setting.Actions.Enabled, true)()
output := cmdForgejoCaptureOutput(t, []string{"forgejo-cli", "actions", "generate-runner-token"})
assert.EqualValues(t, 40, len(output))
})
}