forked from TrueCloudLab/restic
backend: Adjust tests to use the Factory to instantiate the backend
This drastically reduces the amount of duplicated test code.
This commit is contained in:
parent
3d3bb88745
commit
13a8b5822f
13 changed files with 119 additions and 423 deletions
|
@ -57,7 +57,7 @@ func (s *Suite[C]) TestCreateWithConfig(t *testing.T) {
|
|||
store(t, b, restic.ConfigFile, []byte("test config"))
|
||||
|
||||
// now create the backend again, this must fail
|
||||
_, err = s.Create(*s.Config)
|
||||
_, err = s.createOrError()
|
||||
if err == nil {
|
||||
t.Fatalf("expected error not found for creating a backend with an existing config file")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue