gopass/tests/audit_test.go
Dominik Schulz 34567d93ee
[bugfix] Bring back audit summary (#2820)
* [bugfix] Bring back audit summary

This PR brings back the audit summary view and displays only that by
default. This restores the old behaviour before we refactored the
audit implementation. The new view is still available with the
new --full flag.

Fixes #2816

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix tests.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix integration test

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-13 14:26:06 +01:00

24 lines
411 B
Go

package tests
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestAudit(t *testing.T) {
ts := newTester(t)
defer ts.teardown()
ts.initStore()
ts.initSecrets("")
t.Run("audit the test store", func(t *testing.T) {
out, err := ts.run("audit")
require.Error(t, err)
assert.Contains(t, out, "crunchy")
assert.Contains(t, out, "zxcvbn")
})
}