From 705ad51bcc46cac89bcaf2b1b5f58d479a3e1e2e Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 8 Jun 2023 17:05:20 +0200 Subject: [PATCH] backend: check that StripPassword can be called --- internal/backend/test/tests.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/backend/test/tests.go b/internal/backend/test/tests.go index 4a6a3f2a0..14faad0d5 100644 --- a/internal/backend/test/tests.go +++ b/internal/backend/test/tests.go @@ -36,6 +36,12 @@ func beTest(ctx context.Context, be restic.Backend, h restic.Handle) (bool, erro return err == nil, err } +// TestStripPasswordCall tests that the StripPassword method of a factory can be called without crashing. +// It does not verify whether passwords are removed correctly +func (s *Suite[C]) TestStripPasswordCall(t *testing.T) { + s.Factory.StripPassword("some random string") +} + // TestCreateWithConfig tests that creating a backend in a location which already // has a config file fails. func (s *Suite[C]) TestCreateWithConfig(t *testing.T) {