MCPcopy Create free account
hub / github.com/creativeprojects/resticprofile / TestLoadRemoteFilesCorruptTar

Function TestLoadRemoteFilesCorruptTar

remote_test.go:136–143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

134}
135
136func TestLoadRemoteFilesCorruptTar(t *testing.T) {
137 srv := newTarServer(t, []byte("this is not a tar archive"))
138 defer srv.Close()
139
140 _, _, err := loadRemoteFiles(context.Background(), srv.URL)
141 require.Error(t, err)
142 assert.Contains(t, err.Error(), "failed to read tar header")
143}
144
145func TestLoadRemoteFilesInvalidManifestJSON(t *testing.T) {
146 entries := []struct{ name, content string }{

Callers

nothing calls this directly

Calls 4

newTarServerFunction · 0.85
loadRemoteFilesFunction · 0.85
CloseMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected