Commit 2658e1c3 authored by Jérome Perrin's avatar Jérome Perrin

main_test/TestGetGitBlob: workaround a segfault in test

This test also segfaults on v7.0.1 (before Nexedi patches) with both go
1.12 and also go 1.18.

My understanding of this test is that this emulates a proxy which
delegates service the blob to workhorse and writes a wrong blob content
(GNU Licence) and we expect that the actual blob content (MIT Licence)
is served, regardless of what the proxy have written, so it does not
seem so important to simulate the proxy writing something wrong, as
long as we assert that the actual received content is correct.
parent 8579e30d
......@@ -566,10 +566,6 @@ func TestGetGitBlob(t *testing.T) {
responseJSON := fmt.Sprintf(`{"RepoPath":"%s","BlobId":"%s"}`, path.Join(testRepoRoot, testRepo), blobId)
encodedJSON := base64.StdEncoding.EncodeToString([]byte(responseJSON))
w.Header().Set(headerKey, "git-blob:"+encodedJSON)
if _, err := fmt.Fprintf(w, "GNU General Public License"); err != nil {
t.Fatal(err)
}
return
})
defer ts.Close()
ws := startWorkhorseServer(ts.URL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment