check / check (push) Failing after 2s
REPO_POLICIES.md requires the module root sneak.berlin/go/<name>. go.mod, every import (rewritten with gofmt -r), the -X flags in script/build and the examples in the pkg READMEs now use the new path. go mod tidy lists go-humanize and fatih/color as direct requirements, since internal/cli imports them. This breaks anyone who fetched or imported git.eeqj.de/sneak/secret: they must switch to sneak.berlin/go/secret, which resolves to this repository. Model: opus-5-5
25 lines
776 B
Go
25 lines
776 B
Go
package cli_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
"sneak.berlin/go/secret/internal/cli"
|
|
)
|
|
|
|
//nolint:paralleltest // executes the CLI in-process against shared state
|
|
func TestOutputCapture(t *testing.T) {
|
|
// Test vault list command which we fixed
|
|
output, err := cli.ExecuteCommandInProcess([]string{"vault", "list"}, "", nil)
|
|
require.NoError(t, err)
|
|
assert.Contains(t, output, "Available vaults", "should capture vault list output")
|
|
t.Logf("vault list output: %q", output)
|
|
|
|
// Test help command
|
|
output, err = cli.ExecuteCommandInProcess([]string{"--help"}, "", nil)
|
|
require.NoError(t, err)
|
|
assert.NotEmpty(t, output, "help output should not be empty")
|
|
t.Logf("help output length: %d", len(output))
|
|
}
|