MCPcopy
hub / github.com/kopia/kopia / TestChangePassword

Method TestChangePassword

repo/repository_test.go:760–771  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

758}
759
760func (s *formatSpecificTestSuite) TestChangePassword(t *testing.T) {
761 ctx, env := repotesting.NewEnvironment(t, s.formatVersion)
762 if s.formatVersion == format.FormatVersion1 {
763 require.Error(t, env.RepositoryWriter.FormatManager().ChangePassword(ctx, "new-password"))
764 } else {
765 require.NoError(t, env.RepositoryWriter.FormatManager().ChangePassword(ctx, "new-password"))
766
767 r, err := repo.Open(ctx, env.RepositoryWriter.ConfigFilename(), "new-password", nil)
768 require.NoError(t, err)
769 r.Close(ctx)
770 }
771}
772
773func TestMetrics_CompressibleData(t *testing.T) {
774 ctx, env := repotesting.NewEnvironment(t, repotesting.FormatNotImportant)

Callers

nothing calls this directly

Calls 7

NewEnvironmentFunction · 0.92
OpenFunction · 0.92
ChangePasswordMethod · 0.80
ErrorMethod · 0.65
FormatManagerMethod · 0.65
ConfigFilenameMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected