forgejo/tests/integration/cmd_forgejo_actions_test.go
Earl Warren 52a65b48ea
[CLI] implement forgejo-cli actions generate-runner-token
(cherry picked from commit 08be2b226e)
(cherry picked from commit 9a0f6315da)
(cherry picked from commit 2f264eeeec)
2023-07-16 23:21:45 +02:00

22 lines
500 B
Go

// 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))
})
}