diff --git a/Makefile b/Makefile index 3ae872e93c..c333d4c0fe 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,7 @@ clean: @rm -f gopass-*.tar.gz @rm -f gopass-*-* @rm -f tests/tests + @rm -f *.test @rm -rf dist/* @rm -f *.completion @printf '%s\n' '$(OK)' @@ -113,7 +114,7 @@ fulltest: $(GOPASS_OUTPUT) @echo "mode: atomic" > coverage-all.out @$(foreach pkg, $(PKGS),\ echo -n " ";\ - go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -coverprofile=coverage.out -covermode=atomic $(pkg) -tags 'xc' || exit 1;\ + go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -coverprofile=coverage.out -covermode=atomic $(pkg) || exit 1;\ tail -n +2 coverage.out >> coverage-all.out;) @$(GO) tool cover -html=coverage-all.out -o coverage-all.html @@ -122,14 +123,14 @@ fulltest-nocover: $(GOPASS_OUTPUT) @echo "mode: atomic" > coverage-all.out @$(foreach pkg, $(PKGS),\ echo -n " ";\ - go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) -tags 'xc' || exit 1;) + go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) || exit 1;) racetest: $(GOPASS_OUTPUT) @echo ">> TEST, \"full-mode\": race detector on" @echo "mode: atomic" > coverage-all.out @$(foreach pkg, $(PKGS),\ echo -n " ";\ - go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -race -coverprofile=coverage.out -covermode=atomic $(pkg) -tags 'xc' || exit 1;\ + go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -race -coverprofile=coverage.out -covermode=atomic $(pkg) || exit 1;\ tail -n +2 coverage.out >> coverage-all.out;) @$(GO) tool cover -html=coverage-all.out -o coverage-all.html @@ -137,7 +138,7 @@ test: $(GOPASS_OUTPUT) @echo ">> TEST, \"fast-mode\": race detector off" @$(foreach pkg, $(PKGS),\ echo -n " ";\ - $(GO) test -test.short -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) -tags 'xc' || exit 1) + $(GO) test -test.short -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) || exit 1) test-integration: $(GOPASS_OUTPUT) cd tests && GOPASS_BINARY=$(PWD)/$(GOPASS_OUTPUT) GOPASS_TEST_DIR=$(PWD)/tests go test -v @@ -155,7 +156,7 @@ crosscompile: full: @echo -n ">> COMPILE linux/amd64 xc" - $(GO) build -o $(GOPASS_OUTPUT)-full -tags "xc" + $(GO) build -o $(GOPASS_OUTPUT)-full %.completion: $(GOPASS_OUTPUT) @printf ">> $* completion, output = $@" diff --git a/internal/action/init_test.go b/internal/action/init_test.go index c732f29afc..1c8ae40dbd 100644 --- a/internal/action/init_test.go +++ b/internal/action/init_test.go @@ -77,10 +77,10 @@ func TestInitParseContext(t *testing.T) { check func(context.Context) error }{ { - name: "crypto xc", - flags: map[string]string{"crypto": "xc"}, + name: "crypto age", + flags: map[string]string{"crypto": "age"}, check: func(ctx context.Context) error { - if be := backend.GetCryptoBackend(ctx); be != backend.XC { + if be := backend.GetCryptoBackend(ctx); be != backend.Age { return fmt.Errorf("wrong backend: %d", be) } return nil diff --git a/internal/notify/icon.go b/internal/notify/icon.go index 941036ac0a..52de630128 100644 --- a/internal/notify/icon.go +++ b/internal/notify/icon.go @@ -7,12 +7,12 @@ import ( "os" "path/filepath" - "github.com/gopasspw/gopass/internal/config" + "github.com/gopasspw/gopass/pkg/appdir" "github.com/gopasspw/gopass/pkg/fsutil" ) func iconURI() string { - iconFN := filepath.Join(config.Directory(), "gopass-logo-small.png") + iconFN := filepath.Join(appdir.UserCache(), "gopass-logo-small.png") if !fsutil.IsFile(iconFN) { fh, err := os.OpenFile(iconFN, os.O_WRONLY|os.O_CREATE, 0644) if err != nil { diff --git a/internal/notify/notify_test.go b/internal/notify/notify_test.go index 4def80f9e2..01e1138a66 100644 --- a/internal/notify/notify_test.go +++ b/internal/notify/notify_test.go @@ -22,7 +22,7 @@ func TestIcon(t *testing.T) { _ = os.Remove(fn) _ = iconURI() fh, err := os.Open(fn) - assert.NoError(t, err) + require.NoError(t, err) defer func() { assert.NoError(t, fh.Close()) }() diff --git a/main_test.go b/main_test.go index 47189fbfb4..7ea76df59c 100644 --- a/main_test.go +++ b/main_test.go @@ -120,7 +120,7 @@ func TestGetCommands(t *testing.T) { c.Context = ctx commands := getCommands(act, app) - assert.Equal(t, 37, len(commands)) + assert.Equal(t, 36, len(commands)) prefix := "" testCommands(t, c, commands, prefix) diff --git a/pkg/tempfile/mount_darwin.go b/pkg/tempfile/mount_darwin.go index f9718fa715..f07a32c236 100644 --- a/pkg/tempfile/mount_darwin.go +++ b/pkg/tempfile/mount_darwin.go @@ -22,7 +22,7 @@ func tempdirBase() string { } func (t *File) mount(ctx context.Context) error { - // create 16MB ramdisk + // create 32MB ramdisk cmd := exec.CommandContext(ctx, "hdid", "-drivekey", "system-image=yes", "-nomount", "ram://32768") cmd.Stderr = os.Stderr