1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-27 09:11:53 -05:00
forgejo/tests/integration/cmd_forgejo_actions_test.go
Earl Warren ef51e4b751
[CLI] implement forgejo-cli actions generate-secret
(cherry picked from commit 6f7905c8ec)
(cherry picked from commit 2a958031a9)
(cherry picked from commit 946d209f46)
2023-07-16 23:21:45 +02:00

27 lines
655 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)()
var output string
output = cmdForgejoCaptureOutput(t, []string{"forgejo-cli", "actions", "generate-runner-token"})
assert.EqualValues(t, 40, len(output))
output = cmdForgejoCaptureOutput(t, []string{"forgejo-cli", "actions", "generate-secret"})
assert.EqualValues(t, 40, len(output))
})
}