forked from forgejo/forgejo
[CLI] implement forgejo-cli actions generate-runner-token
(cherry picked from commit08be2b226e
) (cherry picked from commit9a0f6315da
) (cherry picked from commit2f264eeeec
)
This commit is contained in:
parent
935fb85e8b
commit
52a65b48ea
3 changed files with 88 additions and 4 deletions
22
tests/integration/cmd_forgejo_actions_test.go
Normal file
22
tests/integration/cmd_forgejo_actions_test.go
Normal 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))
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue